-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.27 KB
/
release.yml
File metadata and controls
57 lines (47 loc) · 1.27 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Release
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
attestations: write
environment:
name: npm-release
url: https://www.npmjs.com/package/@swaggerexpert/json-pointer
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Build code
run: npm run build
- name: Execute tests
run: npm test
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: npx semantic-release
- name: Attest npm tarball (GitHub)
uses: actions/attest-build-provenance@v3
with:
subject-path: "dist/*.tgz"
- name: Publish tarball to npm (OIDC)
run: |
set -euo pipefail
TARBALL="$(ls -1 dist/*.tgz | head -n 1)"
echo "Publishing $TARBALL"
npm publish "file:./$TARBALL" --provenance