Skip to content

Commit

Permalink
chore: publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanssen0 committed Feb 14, 2025
1 parent 80e605d commit 89d89b3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish-canary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release to NPM Canary

permissions:
contents: write

on: workflow_dispatch

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: pnpm build:prepare
- name: Build
run: pnpm build

- name: Version changesets
run: pnpm changeset version --snapshot canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to npm canary
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset publish --tag canary
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
title: "chore: bump packages version"
commit: "chore: bump packages version"
version: pnpm run version
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm run publish
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 89d89b3

Please sign in to comment.