Submit for Review #20
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: Submit for Review | |
# https://github.com/aklinker1/github-better-line-counts/blob/main/.github/workflows/submit.yml | |
# https://github.com/Midra429/NCOverlay/blob/main/.github/workflows/release.yml | |
on: | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
default: false | |
type: boolean | |
description: Skip submission and perform a dry run | |
skipSubmit: | |
default: false | |
type: boolean | |
description: Skip submission for review | |
bump_type: | |
description: "v[major].[minor].[patch]" | |
required: true | |
type: choice | |
default: "patch" | |
options: | |
- major | |
- minor | |
- patch | |
jobs: | |
submit: | |
name: Submit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Configure Git | |
run: | | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config user.name "github-actions[bot]" | |
- name: Bump Version | |
id: version | |
run: | | |
pnpm version ${{ inputs.bump_type }} | |
echo "newVersion=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT" | |
- name: Push | |
if: ${{ !inputs.dryRun }} | |
run: | | |
git push | |
git push --tags | |
- name: Build and Zip | |
run: | | |
pnpm zip | |
pnpm zip:firefox | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
include-hidden-files: true | |
path: .output/*.zip | |
if-no-files-found: error | |
- name: Submit | |
run: | | |
pnpm wxt submit \ | |
--chrome-zip .output/*-chrome.zip \ | |
--firefox-zip .output/*-firefox.zip --firefox-sources-zip .output/*-sources.zip | |
env: | |
DRY_RUN: ${{ inputs.dryRun }} | |
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 }} | |
CHROME_SKIP_SUBMIT_REVIEW: ${{ inputs.skipSubmit }} | |
FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }} | |
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }} | |
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }} | |
- name: Release | |
if: ${{ !inputs.dryRun }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: v${{ steps.version.outputs.newVersion }} | |
name: v${{ steps.version.outputs.newVersion }} | |
generate_release_notes: true |