66 - master
77
88jobs :
9- tag :
9+ check_tag :
1010 runs-on : ubuntu-latest
1111 outputs :
1212 tag_already_exists : ${{ steps.check_tag.outputs.exists }}
@@ -34,17 +34,29 @@ jobs:
3434 echo "exists=false" >> $GITHUB_OUTPUT
3535 fi
3636
37+ release :
38+ runs-on : ubuntu-latest
39+ needs : check_tag
40+ if : needs.check_tag.outputs.tag_already_exists == 'false'
41+ outputs :
42+ tag_version : ${{ steps.release.outputs.version }}
43+
44+ steps :
45+ - name : Checkout repository
46+ uses : actions/checkout@v5
47+
3748 - name : Create Github release
49+ id : release
3850 if : steps.check_tag.outputs.exists == 'false'
3951 env :
4052 GH_TOKEN : ${{ github.token }}
4153 run : |
42- gh release create "$version" --latest --title "$version" --generate-notes
54+ gh release create "${{needs.check_tag.outputs.tag_version}}" --latest --title "${{needs.check_tag.outputs.tag_version}}" --generate-notes
55+ echo "version=${{needs.check_tag.outputs.tag_version}}" >> $GITHUB_OUTPUT
4356
4457 build-chrome :
4558 runs-on : ubuntu-latest
46- needs : tag
47- if : needs.tag.outputs.tag_already_exists == 'false'
59+ needs : release
4860
4961 steps :
5062 - name : Checkout repository
@@ -60,12 +72,11 @@ jobs:
6072 env :
6173 GH_TOKEN : ${{ github.token }}
6274 run : |
63- gh release upload ${{needs.tag .outputs.tag_version}} dist/Chrome.zip
75+ gh release upload ${{needs.release .outputs.tag_version}} dist/Chrome.zip
6476
6577 build-firefox :
6678 runs-on : ubuntu-latest
67- needs : tag
68- if : needs.tag.outputs.tag_already_exists == 'false'
79+ needs : release
6980
7081 steps :
7182 - name : Checkout repository
8192 env :
8293 GH_TOKEN : ${{ github.token }}
8394 run : |
84- gh release upload ${{needs.tag.outputs.tag_version}} dist/Firefox.zip
85-
86- debug :
87- runs-on : ubuntu-latest
88- needs : tag
89- steps :
90- - name : Checkout repository
91- uses : actions/checkout@v5
92-
93- - name : echo version
94- run : |
95- echo "version: ${{needs.tag.outputs.tag_version}}"
95+ gh release upload ${{needs.release.outputs.tag_version}} dist/Firefox.zip
0 commit comments