-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (43 loc) · 1.23 KB
/
release.yml
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
name: publish npm packages
# on:
# push:
# branches:
# - main
on:
pull_request:
env:
FORCE_COLOR: "1"
jobs:
publish:
# environment: Production
runs-on: ledgerhq-shared-medium
permissions:
id-token: write
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-toolchain-composite
- name: install dependencies
run: pnpm install
- name: build libraries
run: pnpm build
- name: Login to JFrog Ledger
id: jfrog-login
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1
- name: Setup npm config
env:
NPM_REGISTRY: jfrog.ledgerlabs.net/artifactory/api/npm/ldk-npm-prod-public
run: |
cat << EOF | tee .npmrc
# Setup JFrog registry
registry=https://${NPM_REGISTRY}
//${NPM_REGISTRY}/:_authToken=${{ steps.jfrog-login.outputs.oidc-token }}
EOF
- name: Publish to npm
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
NPM_TOKEN: ${{ steps.jfrog-login.outputs.oidc-token }}