Skip to content

Release

Release #31

Workflow file for this run

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/jsonpath
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm ci
- 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