Skip to content

0.5.0-beta.11

0.5.0-beta.11 #42

Workflow file for this run

name: Build extension
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: Parse semver string
id: semver
uses: booxmedialtd/ws-action-parse-semver@v1.4.7
with:
input_string: ${{ github.ref }}
version_extractor_regex: '\/v(.*)$'
- run: bun run build
- run: bun run dist
- run: bun run dist:lint
- name: Sign pre-release for firefox
env:
API_KEY: ${{ secrets.AMO_API_KEY }}
API_SECRET: ${{ secrets.AMO_API_SECRET }}
CHANNEL: ${{ steps.semver.outputs.prerelease && 'unlisted' || 'listed' }}
VERSION: ${{ steps.semver.outputs.fullversion }}
run: bun x web-ext sign --config=scripts/web-ext.firefox.cjs --channel=$CHANNEL --api-key=$API_KEY --api-secret=$API_SECRET --upload-source-code=dist/artifacts/source/ao3-enhancements_source_$VERSION.zip
- name: Rename .xpi to proper version if applicable
env:
VERSION: ${{ steps.semver.outputs.fullversion }}
run: |
if ls dist/artifacts/firefox/*.xpi 1> /dev/null 2>&1; then
mv dist/artifacts/firefox/*.xpi dist/artifacts/source/ao3-enhancements_firefox_$VERSION.xpi
rm dist/artifacts/firefox/ao3-enhancements_firefox_$VERSION.zip
fi
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
prerelease: ${{ steps.semver.outputs.prerelease }}
files: |
dist/artifacts/chrome/ao3-enhancements_chrome_${{ steps.semver.outputs.fullversion }}.zip
dist/artifacts/firefox/ao3-enhancements_firefox_${{ steps.semver.outputs.fullversion }}.xpi
dist/artifacts/firefox/ao3-enhancements_firefox_${{ steps.semver.outputs.fullversion }}.zip
dist/artifacts/source/ao3-enhancements_source_${{ steps.semver.outputs.fullversion }}.zip