-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.33 KB
/
publish-latest.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
name: "Publish latest release"
on:
workflow_dispatch:
branches: [main]
jobs:
publish:
name: Publish latest packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.BSNORG_ACTIONS_SECRET }}
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"
- name: Setup .npmrc file for publish
uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://registry.npmjs.org"
cache: "npm"
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}
- run: npm ci
- run: npm run build -- --cache-dir=".turbo"
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.BSNORG_ACTIONS_SECRET }}
GITHUB_TOKEN: ${{ secrets.BSNORG_ACTIONS_SECRET }}
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
npx lerna publish --dist-tag latest --conventional-graduate --yes --create-release github