Create changesets workflow #6
Workflow file for this run
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: Changesets | |
on: | |
pull_request: | |
paths: | |
- "anghammarad-client-node/**" | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
# Checkout the branch | |
- uses: actions/checkout@v4 | |
# Node is needed to run the app | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- run: cd anghammarad-client-node && yarn install --frozen-lockfile | |
# Build Tracker-js by running the script | |
- name: Run build script | |
run: cd anghammarad-client-node && npm run prepare | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: npx changeset publish | |
title: "🦋 Release package updates" | |
commit: "Bump package version" | |
cwd: "./anghammarad-client-node" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |