Skip to content

0.5.0-beta.8

0.5.0-beta.8 #40

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: echo bun x web-ext sign --config=scripts/web-ext.firefox.cjs --channel=unlisted "--api-key=$API_KEY" "--api-secret=$API_SECRET" --upload-source-code="dist/artifacts/source/ao3-enhancements_source_$VERSION.zip"
- 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 }}.zip
dist/artifacts/source/ao3-enhancements_source_${{ steps.semver.outputs.fullversion }}.zip