-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (31 loc) · 984 Bytes
/
build-npm-release.yml
File metadata and controls
40 lines (31 loc) · 984 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
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Publish release npm
on:
release:
types: [published]
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
env:
FOLIO_NPM_REGISTRY: 'https://repository.folio.org/repository/npm-folioci/'
RESHARE_NPM_REGISTRY: 'https://registry.npmjs.org'
NODEJS_VERSION: '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODEJS_VERSION }}
registry-url: ${{ env.RESHARE_NPM_REGISTRY }}
scope: '@projectreshare'
- name: Upgrade npm to version that supports trusted publishing
run: |
npm install -g npm@^11.5.1
npm -v
- name: Set yarn config
run: |
yarn config set @folio:registry ${{ env.FOLIO_NPM_REGISTRY }}
yarn config set @projectreshare:registry ${{ env.RESHARE_NPM_REGISTRY }}
- run: yarn install
- run: npm publish