-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.58 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 }}