generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (30 loc) · 1.18 KB
/
release.yml
File metadata and controls
35 lines (30 loc) · 1.18 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
name: Publish Package to NPMJS.org
on:
workflow_dispatch:
jobs:
publish-to-npmjs:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
environment: npmjs:@sap/sql-interface-specification
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
# registry-url is required for releasing packages
registry-url: 'https://registry.npmjs.org'
- name: Install latest npm cli
run: npm install -g npm@latest
# Skipping install since all assets are pre-built already
# - run: npm install
- run: |
cd ./scripts
npm install
./yaml2json < ../schemas/v1.0/schema.yaml > ../schemas/v1.0/schema.json
- name: Publish package
# --provenance enables the automatic generation of provenance statements (when using trusted publisher, this is automatically enabled and therefore optional)
# --access public is only hard required for the initial release, but it doesn't hurt having it setup
# npm version >=11.5.1 required for trusted publisher
run: npm publish --provenance --access public