File tree 1 file changed +24
-2
lines changed
1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 24
24
- uses : actions/checkout@v2
25
25
- run : |
26
26
PROBE_VERSION="$(python setup.py --version)"
27
- echo "PROBE_VERSION =$PROBE_VERSION" >> $GITHUB_ENV
27
+ echo "SPP_PROBE_VERSION =$PROBE_VERSION" >> $GITHUB_ENV
28
28
- 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
30
30
- run : cd e2e && docker-compose up -d
31
31
- name : Docker IPs
32
32
run : docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
90
90
- name : Docker logs
91
91
run : cd e2e && docker-compose logs -t --tail="all"
92
92
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