File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 2424 - uses : actions/checkout@v2
2525 - run : |
2626 PROBE_VERSION="$(python setup.py --version)"
27- echo "PROBE_VERSION =$PROBE_VERSION" >> $GITHUB_ENV
27+ echo "SPP_PROBE_VERSION =$PROBE_VERSION" >> $GITHUB_ENV
2828 - run : python setup.py sdist
29- - run : cp dist/sourceplusplus-${{ env.PROBE_VERSION }}.tar.gz e2e && ls && pwd
29+ - run : cp dist/sourceplusplus-${{ env.SPP_PROBE_VERSION }}.tar.gz e2e && ls && pwd
3030 - run : cd e2e && docker-compose up -d
3131 - name : Docker IPs
3232 run : docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
9090 - name : Docker logs
9191 run : cd e2e && docker-compose logs -t --tail="all"
9292 if : ${{ always() }}
93+
94+ - name : Remove Old Release Drafts
95+ if : github.ref == 'refs/heads/master'
96+ env :
97+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
98+ run : |
99+ curl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY/releases \
100+ | tr '\r\n' ' ' \
101+ | jq '.[] | select(.draft == true) | .id' \
102+ | xargs -I '{}' \
103+ curl -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY/releases/{}
104+
105+ - name : Create Release Draft
106+ if : github.ref == 'refs/heads/master'
107+ id : createDraft
108+ uses : actions/create-release@v1
109+ env :
110+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111+ with :
112+ tag_name : ${{ env.SPP_PROBE_VERSION }}
113+ release_name : v${{ env.SPP_PROBE_VERSION }}
114+ draft : true
You can’t perform that action at this time.
0 commit comments