Skip to content

Merge pull request #40 from sisgha/thici #40

Merge pull request #40 from sisgha/thici

Merge pull request #40 from sisgha/thici #40

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: "CI JavaScript: @sisgea/spec"
on:
push:
branches:
- main
- development
paths:
- "javascript/sisgea-spec/**/*"
- .github/workflows/ci-js-spec.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: javascript/sisgea-spec
permissions:
contents: read # for checkout
jobs:
quality:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: ./javascript/sisgea-spec/package-lock.json
- run: npm ci
- run: npm run build --if-present
- run: npm run test --if-present
- run: npm audit signatures
publish:
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
needs: [quality]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
cache-dependency-path: ./javascript/sisgea-spec/package-lock.json
- run: npm ci
- run: npm run build
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release