v3.0.2 #41
Workflow file for this run
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: Latest Release Build | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
env: | |
ADDON_ID: "{20f2dcdf-6f8d-4aeb-862b-b13174475d9c}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: c-hive/gha-yarn-cache@v1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install modules | |
run: | | |
sudo apt install jq | |
yarn | |
VERSION=$(echo -n "${{ github.ref }}" | sed 's/[refs\/tagv]//g' | sed 's/-.*//') | |
jq --arg version $VERSION '.version = $version' src/manifest.json > src/manifest.json.tmp | |
mv src/manifest.json.tmp src/manifest.json | |
- name: Build Chrome | |
run: | | |
VERSION=$(echo -n "${{ github.ref }}" | sed 's/[refs\/tagv]//g' | sed 's/-.*//') yarn build:chrome | |
yarn package | |
- name: Upload Chrome package to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/YtcFilter-Chrome.zip | |
asset_name: YtcFilter-Chrome.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Build Firefox | |
run: | | |
VERSION=$(echo -n "${{ github.ref }}" | sed 's/[refs\/tagv]//g' | sed 's/-.*//') yarn build:firefox | |
yarn package | |
- name: Upload Firefox package to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/YtcFilter-Firefox.zip | |
asset_name: YtcFilter-Firefox.zip | |
tag: ${{ github.ref }} | |
overwrite: true |