Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

2024.2.23.0

2024.2.23.0 #68

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- run: dart pub get
- name: Run build.dart script
run: dart build.dart -v
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: UoM_Enhancements_Unsigned
path: output
sign-xpi:
name: Sign XPI
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install web-ext
run: npm install --global web-ext
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: UoM_Enhancements_Unsigned
path: output
- name: Print files
run: ls -l output
- name: Sign extension
working-directory: output
run: |
web-ext sign \
--api-key ${{ secrets.WEB_EXT_API_KEY }} \
--api-secret ${{ secrets.WEB_EXT_API_SECRET }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: UoM_Enhancements_Signed
path: output/web-ext-artifacts/
- name: Rename xpi
run: mv output/web-ext-artifacts/*.xpi UoM_Enhancements.xpi
- name: Upload to release
uses: ncipollo/release-action@v1
with:
artifacts: UoM_Enhancements.xpi
bodyFile: .release-body.md
token: ${{ secrets.GITHUB_TOKEN }}
chrome-web-store:
name: Publish to Chrome Web Store
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: UoM_Enhancements_Unsigned
path: output
- name: Print files
run: ls -l output
- name: Zip files
working-directory: output
run: zip -r ../UoM_Enhancements.zip .
- name: Publish to Chrome Web Store
uses: mobilefirstllc/cws-publish@latest
with:
action: 'publish'
client_id: ${{ secrets.CHROME_CLIENT_ID }}
client_secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh_token: ${{ secrets.CHROME_REFRESH_TOKEN }}
extension_id: 'igcbpelbigppckbhkmjfmjhgepoblfkn'
zip_file: 'UoM_Enhancements.zip'