forked from Bhoos/react-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (24 loc) · 798 Bytes
/
release.yml
File metadata and controls
27 lines (24 loc) · 798 Bytes
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
# Promote staging version to production (latest)
name: Promote to Production
on:
release:
types: [published]
jobs:
production-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@bhoos'
- name: Publish release
run: |
pkg=$(node -p "require('./package.json').name")
version=$(node -p "require('./package.json').version")
echo "Releasing ${pkg}@${version} to latest"
# The following command doesn't work with `yarn tag` (2021-Jan-06)
npm dist-tag add ${pkg}@${version} latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}