Debian Codegraph @

.github/workflows/typescript-publish.yml

raw
1 #
2 # Copyright 2023 The Sigstore Authors.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 on:
17 push:
18 tags:
19 - 'release/typescript/v*'
20
21 name: Release TypeScript package
22
23 permissions: {}
24
25 jobs:
26 publish:
27 name: Publish package to npmjs
28 runs-on: ubuntu-latest
29 permissions:
30 contents: read
31 id-token: write # needed to sign provenance
32 defaults:
33 run:
34 working-directory: gen/pb-typescript
35 steps:
36 - name: Checkout source
37 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38 with:
39 persist-credentials: false
40 - name: Setup node
41 uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
42 with:
43 node-version: 24
44 registry-url: 'https://registry.npmjs.org'
45 package-manager-cache: false
46 - name: Install npm w/ OIDC support
47 run: |
48 npm install -g npm@">=11.5.0"
49 - name: Build package
50 run: |
51 npm ci
52 npm run build
53 - name: Publish package
54 run: |
55 npm publish --provenance --access public
56