Skip to content

Commit

Permalink
Merge pull request #8 from isaac-mason/main
Browse files Browse the repository at this point in the history
feat: setup changesets release github action
  • Loading branch information
isaac-mason authored Jan 26, 2023
2 parents 22d3827 + d9b257a commit 6b006d4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches:
- main

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

jobs:
release:
name: Release
if: github.repository_owner == 'pmndrs'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset:version
publish: yarn changeset:release
commit: 'chore(changeset): release packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"changeset:add": "changeset add",
"changeset:version": "yarn changeset version",
"changeset:version": "yarn changeset version && yarn install --mode update-lockfile",
"changeset:release": "yarn build && yarn build-storybook && yarn changeset publish"
},
"husky": {
Expand Down

1 comment on commit 6b006d4

@vercel
Copy link

@vercel vercel bot commented on 6b006d4 Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.