Skip to content

Commit 30e1ea1

Browse files
try using github cli releases
1 parent 589d3a3 commit 30e1ea1

File tree

1 file changed

+7
-37
lines changed

1 file changed

+7
-37
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
outputs:
1212
tag_already_exists: ${{ !steps.check_tag.outputs.exists }}
13+
tag_version: ${{ !steps.check_tag.outputs.version }}
1314
steps:
1415
- name: Checkout repository
1516
uses: actions/checkout@v5
@@ -32,13 +33,10 @@ jobs:
3233
echo "exists=false" >> $GITHUB_OUTPUT
3334
fi
3435
35-
- name: Create tag if missing
36+
- name: Create Github release
3637
if: steps.check_tag.outputs.exists == 'false'
3738
run: |
38-
git config user.name "github-actions[bot]"
39-
git config user.email "github-actions[bot]@users.noreply.github.com"
40-
git tag -a "$version" -m "Release $version"
41-
git push origin "$version"
39+
gh release create "$version" --latest --title "$version" --generate-notes
4240
4341
build-chrome:
4442
runs-on: ubuntu-latest
@@ -56,10 +54,8 @@ jobs:
5654
zip -r ../dist/Chrome.zip .
5755
5856
- name: Upload Chrome artifact
59-
uses: actions/upload-artifact@v4
60-
with:
61-
name: Chrome
62-
path: dist/Chrome.zip
57+
run: |
58+
gh release upload ${{needs.tag.outputs.tag_version}} dist/Chrome.zip
6359
6460
build-firefox:
6561
runs-on: ubuntu-latest
@@ -77,31 +73,5 @@ jobs:
7773
zip -r ../dist/Firefox.zip .
7874
7975
- name: Upload Firefox artifact
80-
uses: actions/upload-artifact@v4
81-
with:
82-
name: Firefox
83-
path: dist/Firefox.zip
84-
85-
release:
86-
runs-on: ubuntu-latest
87-
needs: [build-chrome, build-firefox]
88-
89-
steps:
90-
- name: Download Chrome artifact
91-
uses: actions/download-artifact@v5
92-
with:
93-
name: Chrome
94-
path: dist
95-
96-
- name: Download Firefox artifact
97-
uses: actions/download-artifact@v5
98-
with:
99-
name: Firefox
100-
path: dist
101-
102-
- name: Create GitHub Release
103-
uses: softprops/action-gh-release@v2
104-
with:
105-
files: dist/*.zip
106-
env:
107-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
run: |
77+
gh release upload ${{needs.tag.outputs.tag_version}} dist/Firefox.zip

0 commit comments

Comments
 (0)