Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Extension Publisher #25

Extension Publisher

Extension Publisher #25

Workflow file for this run

name: Extension Publisher
on:
workflow_dispatch:
env:
NODE_VERSION: 19.x
jobs:
create-tag:
runs-on: ubuntu-latest
outputs:
new-tag: v${{ steps.versioning.outputs.new-tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git setup
run: |
git --version
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Version upgrade
id: versioning
run: |
NEW_TAG=$(node ./utils/version-upgrader.js PATCH)
# Data saved for next steps
echo "new-tag=$NEW_TAG" >> $GITHUB_OUTPUT
- name: Commit and Push
run: |
git commit -am "v${{ steps.versioning.outputs.new-tag }}" -m "[skip ci]"
git tag -a "v${{ steps.versioning.outputs.new-tag }}" -m "v${{ steps.versioning.outputs.new-tag }}""
git push origin HEAD "v${{ steps.versioning.outputs.new-tag }}"
build:
runs-on: ubuntu-latest
needs: create-tag
steps:
- uses: actions/[email protected]
- name: Node.js Setup
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Dependencies set-up
run: |
npm install --global yarn
yarn install
- name: Extension build
run: yarn build
- uses: actions/[email protected]
with:
name: artifacts.zip
path: |
./dist/extension.zip
./dist/extension-firefox.xpi
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs: [build, create-tag]
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
name: artifacts.zip
path: ./dist/
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ needs.create-tag.outputs.new-tag }} -d --generate-notes ./dist/*