Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anubra266 committed Jan 26, 2024
1 parent 1a0fbd6 commit 85a7fb1
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish

on:
push:
paths:
- '.changeset/**'
- 'packages/**'
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install
uses: ./.github/composite-actions/install

- name: Build packages
run: pnpm build

- name: Publish packages
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Release to dev tag
if: steps.changesets.outputs.published != 'true'
run: |
git checkout main
pnpm changeset version --snapshot dev
pnpm changeset publish --tag dev
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 85a7fb1

Please sign in to comment.