@@ -9,7 +9,7 @@ permissions:
99 contents : write
1010
1111jobs :
12- publish_crates :
12+ publish :
1313 name : Release
1414 runs-on : ubuntu-latest
1515 continue-on-error : true
2828 cargo login $TOKEN
2929 cargo publish --allow-dirty
3030
31- archive :
32- name : Archive
33- runs-on : ubuntu-latest
34- continue-on-error : true
35- steps :
36- - name : Checkout repository
37- uses : actions/checkout@v4
38-
39- - name : Determine archive name
40- shell : bash
41- run : |
42- echo "ARCHIVE=binex-${{ github.ref_name }}" >> $GITHUB_ENV
43-
44- - name : Creating directory for archive
45- shell : bash
46- run : |
47- mkdir -p "$ARCHIVE"
48- cp {README.md,LICENSE} "$ARCHIVE"
49-
50- - name : Gzip archive (Unix)
51- shell : bash
52- run : |
53- tar czf "$ARCHIVE.tar.gz" "$ARCHIVE"
54- shasum -a 256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
55- echo "ASSET=$ARCHIVE.tar.gz" >> $GITHUB_ENV
56- echo "ASSET_SUM=$ARCHIVE.tar.gz.sha256" >> $GITHUB_ENV
57-
58- - name : Upload artifacts
59- uses : actions/upload-artifact@v4
60- with :
61- name : ${{ env.ASSET }}
62- path : |
63- ${{ env.ASSET }}
64-
6531 release :
6632 runs-on : ubuntu-latest
67- needs : ['archive']
68- # continue even though we failed to download or upload one
69- # or more artefacts
70- continue-on-error : true
33+ needs : ['publish']
7134 steps :
7235 - name : Create Release
7336 id : create_release
7841 draft : true
7942 tag_name : ${{ github.ref_name }}
8043 release_name : ${{ github.ref_name }}
81-
82- - name : Download Artifact
83- uses : actions/download-artifact@v4
84- with :
85- name : binex-${{ github.ref_name }}
86-
87- - name : Upload asset
88- uses : actions/upload-release-asset@v1
89- env :
90- GITHUB_TOKEN : ${{ github.token }}
91- with :
92- upload_url : ${{ steps.create_release.outputs.upload_url }}
93- asset_path : binex-${{ github.ref_name }}
94- asset_name : binex-${{ github.ref_name }}
95- asset_content_type : application/gzip
0 commit comments