build(ci): fallback version #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Web Extension | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
version: | |
description: New version of the extension | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build-target: | |
- chrome | |
- firefox | |
env: | |
VERSION: ${{ inputs.version || '0.0.0' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: 'npm' | |
- run: corepack enable | |
- run: npm ci | |
- run: npm run build | |
env: | |
TARGET: ${{ matrix.build-target }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: 283-pinp_${{ env.VERSION }}_${{ matrix.build-target }} | |
path: dist |