Skip to content

Commit

Permalink
ci: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed May 16, 2024
1 parent 7c85c24 commit 586a665
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# .github/workflows/release.yml

name: Release

permissions:
contents: write

on: workflow_dispatch

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc

- name: Install Pnpm
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'pnpm'

- name: Install Dependencies and build
run: pnpm install

- name: Publish to NPM
run: |
pnpm changeset publish
git push --follow-tags
- name: GitHub Release
run: pnpx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
hoist-pattern[]=@mdx-js/loader
registry = 'https://registry.npmjs.org/'
hoist-pattern[]=[]

0 comments on commit 586a665

Please sign in to comment.