Skip to content

Publish release

Publish release #49

# Workflow base: https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions
name: Publish release
on:
workflow_dispatch:
permissions:
contents: read # for checkout
jobs:
release:
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' #|| github.ref == 'refs/heads/main'
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
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Build library
run: npm run build:lib
- name: Copy readme and npmrc files to dist folder
run: |
cp README.md dist/design-angular-kit/README.md
cp .npmrc dist/design-angular-kit/.npmrc
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release