@@ -78,41 +78,40 @@ jobs:
7878 name : dclimplode-py${{ matrix.python-version }}-${{ matrix.python-platform }}-${{ matrix.os }}-${{ matrix.platform }}
7979 path : |
8080 dist/dclimplode-*
81-
82- - name : Ensure release exists
83- if : github.ref_type == 'tag'
81+ - name : Ensure special latest release exists
8482 shell : bash
8583 env :
8684 GH_TOKEN : ${{ github.token }}
8785 run : |
8886 # Set continue on error to true
8987 set +e
90- if [[ "$(gh --repo sourcehold/sourcehold-maps release view ${{ github.ref_name }} 2>&1)" == "release not found" ]]; then
88+ if [[ "$(gh --repo sourcehold/sourcehold-maps release view latest 2>&1)" == "release not found" ]]; then
9189 set -e
92- gh --repo sourcehold/sourcehold-maps release create ${{ github.ref_name }} --latest
90+ gh --repo sourcehold/sourcehold-maps release create latest --latest
9391 fi
94- - name : Upload dclimplode wheel to release
95- if : github.ref_type == 'tag'
92+ - name : Upload dclimplode wheel to special latest release
9693 shell : bash
9794 env :
9895 GH_TOKEN : ${{ github.token }}
9996 run : |
100- gh --repo sourcehold/sourcehold-maps release upload ${{ github.ref_name }} dist/dclimplode-*
101-
102- - name : Ensure special latest release exists
97+ gh --repo sourcehold/sourcehold-maps release upload latest dist/dclimplode-* --clobber
98+
99+ - name : Ensure release exists
100+ if : github.ref_type == 'tag'
103101 shell : bash
104102 env :
105103 GH_TOKEN : ${{ github.token }}
106104 run : |
107105 # Set continue on error to true
108106 set +e
109- if [[ "$(gh --repo sourcehold/sourcehold-maps release view latest 2>&1)" == "release not found" ]]; then
107+ if [[ "$(gh --repo sourcehold/sourcehold-maps release view ${{ github.ref_name }} 2>&1)" == "release not found" ]]; then
110108 set -e
111- gh --repo sourcehold/sourcehold-maps release create latest --latest
109+ gh --repo sourcehold/sourcehold-maps release create ${{ github.ref_name }} --latest
112110 fi
113- - name : Upload dclimplode wheel to special latest release
111+ - name : Upload dclimplode wheel to release
112+ if : github.ref_type == 'tag'
114113 shell : bash
115114 env :
116115 GH_TOKEN : ${{ github.token }}
117116 run : |
118- gh --repo sourcehold/sourcehold-maps release upload latest dist/dclimplode-*
117+ gh --repo sourcehold/sourcehold-maps release upload ${{ github.ref_name }} dist/dclimplode-*
0 commit comments