-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (56 loc) · 1.55 KB
/
release.yml
File metadata and controls
61 lines (56 loc) · 1.55 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
name: Release
on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
inputs:
prerelease:
required: true
type: boolean
branch_name:
required: true
type: string
run_number:
required: true
type: string
run_attempt:
required: true
type: string
jobs:
release:
if: >-
github.event_name == 'pull_request'
&& github.event.pull_request.merged == true
&& github.event.pull_request.head.ref == 'release'
uses: RightCapitalHQ/actions/.github/workflows/nx-release.yml@nx-release/v0.4.2
with:
publish: true
secrets: inherit
prerelease:
if: inputs.prerelease
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.branch_name }}
persist-credentials: false
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install
- name: Publish prerelease (development)
env:
BRANCH_NAME: ${{ inputs.branch_name }}
RUN_NUMBER: ${{ inputs.run_number }}
RUN_ATTEMPT: ${{ inputs.run_attempt }}
NPM_CONFIG_PROVENANCE: true
run: |
preid="${BRANCH_NAME//\//-}".${RUN_NUMBER}.${RUN_ATTEMPT}
npm --no-git-tag-version version prerelease --preid="${preid}"
pnpm publish --no-git-checks --access public --tag development