ci: release package (#64) #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
id-token: write # to publish with provenance | |
contents: write # to create release (changesets/action) | |
issues: write # to post issue comments (changesets/action) | |
pull-requests: write # to create pull request (changesets/action) | |
jobs: | |
release: | |
if: github.repository == 'christoph-fricke/openapi-msw' | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
cache: "npm" | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build Package | |
run: npm run build | |
- name: Version and/or Publish Package | |
uses: changesets/action@v1 | |
with: | |
publish: npm run release | |
version: npm run version | |
commit: "ci: release package" | |
title: "ci: release package" | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |