build: separate browser builds (#1) #40
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 | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 20.x ] | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Setup node ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: corepack enable | |
- run: yarn install | |
- run: yarn run prod | |
- name: Package for Chrome | |
working-directory: dist/browser/chrome | |
run: zip -r ../garmin-connect-enhancements.unpackaged.chrome.zip * | |
- name: Package for Firefox / Gecko | |
working-directory: dist/browser/gecko | |
run: zip -r ../garmin-connect-enhancements.unpackaged.gecko.zip * | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: | | |
dist/browser/garmin-connect-enhancements.unpackaged.chrome.zip | |
dist/browser/garmin-connect-enhancements.unpackaged.gecko.zip | |
dist/userscript/garmin-connect-enhancements.user.js |