release #138
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: release | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
# Fetch all history for all tags and branches | |
fetch-depth: 0 | |
ref: master | |
token: ${{ secrets.BOT_GH_TOKEN }} | |
- name: 🧰 Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.12.0 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Import bot's GPG key for signing commits | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.BOT_GPG_KEY }} | |
git_config_global: true | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: 💽 Install dependencies | |
run: | | |
yarn install --immutable --inline-builds --mode=skip-build | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
- name: 🔨 Build | |
run: | | |
yarn build | |
- name: Publish | |
run: | | |
if [ $RELEASE_MODE = "stable" ]; then yarn publish:stable; else yarn publish:rc; fi | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} | |
# Used for making a GitHub Release | |
GH_TOKEN: ${{ secrets.BOT_GH_TOKEN }} | |
RELEASE_MODE: ${{ vars.RELEASE_MODE }} |