Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/grumpy-emus-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"headertweaker": patch
---

Fix release versions
29 changes: 9 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,17 @@ jobs:

- name: Package Firefox extension
if: steps.changesets.outputs.published == 'true'
run: pnpm exec web-ext build --source-dir=dist/firefox --artifacts-dir=web-ext-artifacts/firefox
run: |
pnpm exec web-ext build --source-dir=dist/firefox --artifacts-dir=web-ext-artifacts/firefox
ZIP=$(find web-ext-artifacts/firefox -name "*.zip" -type f | head -n 1)
mv "$ZIP" "web-ext-artifacts/headertweaker-firefox-${{ steps.get_version.outputs.version }}.zip"

- name: Package Chrome extension
if: steps.changesets.outputs.published == 'true'
run: pnpm exec web-ext build --source-dir=dist/chrome --artifacts-dir=web-ext-artifacts/chrome

- name: Find built zip files
if: steps.changesets.outputs.published == 'true'
id: find_zips
run: |
FIREFOX_ZIP=$(find web-ext-artifacts/firefox -name "*.zip" -type f | head -n 1)
CHROME_ZIP=$(find web-ext-artifacts/chrome -name "*.zip" -type f | head -n 1)
if [ -z "$FIREFOX_ZIP" ]; then
echo "Error: No zip file found for Firefox"
exit 1
fi
if [ -z "$CHROME_ZIP" ]; then
echo "Error: No zip file found for Chrome"
exit 1
fi
echo "firefox_zip=$FIREFOX_ZIP" >> $GITHUB_OUTPUT
echo "chrome_zip=$CHROME_ZIP" >> $GITHUB_OUTPUT
pnpm exec web-ext build --source-dir=dist/chrome --artifacts-dir=web-ext-artifacts/chrome
ZIP=$(find web-ext-artifacts/chrome -name "*.zip" -type f | head -n 1)
mv "$ZIP" "web-ext-artifacts/headertweaker-chromium-${{ steps.get_version.outputs.version }}.zip"

- name: Create GitHub Release
if: steps.changesets.outputs.published == 'true'
Expand All @@ -98,7 +87,7 @@ jobs:
body: |
Automated release for version ${{ steps.get_version.outputs.version }}.
files: |
${{ steps.find_zips.outputs.firefox_zip }}
${{ steps.find_zips.outputs.chrome_zip }}
web-ext-artifacts/headertweaker-firefox-${{ steps.get_version.outputs.version }}.zip
web-ext-artifacts/headertweaker-chromium-${{ steps.get_version.outputs.version }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading