Skip to content

Release

Release #71

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
bump_type:
description: 'v[major].[minor].[patch]'
required: true
type: choice
default: 'patch'
options:
- major
- minor
- patch
jobs:
submit:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Setup Git
run: |
git config user.name "Midra"
git config user.email "[email protected]"
- name: Update Version
run: |
pnpm version ${{ github.event.inputs.bump_type }}
echo VERSION="v$(cat package.json | jq -r '.version')" >> "${GITHUB_ENV}"
- name: Zip Extensions
run: |
pnpm zip
pnpm zip:firefox
- name: Push tag to GitHub
run: |
git push
git push --tags
- name: Create Release to GitHub
run: |
gh release create "${VERSION}" dist/*-chrome.zip dist/*-firefox.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Submit to Stores
run: |
pnpm wxt submit \
--chrome-zip dist/*-chrome.zip \
--firefox-zip dist/*-firefox.zip --firefox-sources-zip dist/*-sources.zip
env:
CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }}
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}