-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83455ca
commit 18046aa
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Changeset Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
node-version-file: | ||
description: "The file containing the Node.js version to use, defaults to .nvmrc" | ||
default: '.nvrmc' | ||
required: false | ||
type: string | ||
publish-script: | ||
description: "The file script to run on publish. Defaults to `pnpm release`" | ||
default: 'pnpm release' | ||
required: false | ||
type: string | ||
version-script: | ||
description: "The file script to run vor bumping the package versions. Defaults to `pnpm changeset version`" | ||
default: 'pnpm changeset version' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
release: | ||
name: changeset-release | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: ${{ inputs.node-version-file }} | ||
cache: 'pnpm' | ||
registry-url: 'https://npm.pkg.github.com/' | ||
scope: '@staffbase' | ||
|
||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile --ignore-scripts | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.STAFFBOT_NPM_WRITE }} | ||
|
||
- name: Create Release Pull Request | ||
id: changesets | ||
uses: changesets/[email protected] | ||
with: | ||
commit: 'chore(release): Bump package version' | ||
title: '📦 Release' | ||
setupGitUser: true | ||
createGithubReleases: true | ||
publish: ${{ inputs.publish-script }} | ||
version: ${{inputs.version-script}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.STAFFBOT_NPM_WRITE }} |