-
Notifications
You must be signed in to change notification settings - Fork 61
53 lines (46 loc) · 1.42 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 }}