-
Notifications
You must be signed in to change notification settings - Fork 158
40 lines (34 loc) · 1.11 KB
/
sample-publish.yml
File metadata and controls
40 lines (34 loc) · 1.11 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
name: Publish samples to NPM
on:
push:
tags:
- 'sample-*'
permissions:
contents: read
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
working-directory: plugins/git-proxy-plugin-samples
run: npm ci
- name: Build TypeScript
working-directory: plugins/git-proxy-plugin-samples
run: npm run build
- name: Install peers and publish
working-directory: plugins/git-proxy-plugin-samples
run: |
npm install --include=peer
npm publish --provenance --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}