Skip to content

Release extensions

Release extensions #10

Workflow file for this run

name: Release
run-name: "Release extensions"
on:
workflow_dispatch:
inputs:
version:
description: "Version to build"
required: true
type: string
jobs:
versioning:
name: Update version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set extension version
shell: bash
run: |
tasks/versioning.py -v ${{ inputs.version }} package.json src/manifest-chrome.json src/manifest-firefox.json
- name: Push new version to master
shell: bash
run: |
git config --global user.name 'release-workflow'
git config --global user.email 'sanderv32@users.noreply.github.com'
git commit -am 'Updated files to version ${{ inputs.version }}'
git push
build:
name: Build extension for ${{ matrix.browser }}
runs-on: ubuntu-latest
needs:
- versioning
strategy:
matrix:
include:
- browser: firefox
extension: xpi
- browser: chrome
extension: zip
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build ${{ matrix.browser }} extension
run: |
tasks/build.py -b ${{ matrix.browser }} -s ./src/ -e aws-account-identifier
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ inputs.version }}
file: aws-account-identifier.${{ matrix.extension }}
asset_name: aws-account-identifier.${{ matrix.extension }}