-
Notifications
You must be signed in to change notification settings - Fork 42
67 lines (56 loc) · 1.71 KB
/
release.yml
File metadata and controls
67 lines (56 loc) · 1.71 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Release
on:
push:
branches: [master]
workflow_dispatch:
inputs:
dry_run:
description: Run nx release in dry-run mode
required: true
default: true
type: boolean
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
with:
filter: tree:0
fetch-depth: 0
- uses: pnpm/action-setup@v6
with:
version: 10.33.0
run_install: false
- name: Setup git creds
env:
config_email: ${{ secrets.GIT_CONFIG_EMAIL }}
config_un: ${{ secrets.GIT_CONFIG_USERNAME }}
run: |
git config --local user.email ${config_email}
git config --local user.name ${config_un}
- run: pnpm install --frozen-lockfile
env:
HUSKY: 0
- name: Set up .npmrc for publishing
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release dry-run
if: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
run: pnpm exec nx release --dry-run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run) }}
run: pnpm exec nx release --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true