Skip to content

Commit

Permalink
Add automated release GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes committed Nov 21, 2023
1 parent ff6ab57 commit 567ca8c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
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
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"version:prepare": "yarn changeset version",
"version:check": "yarn changeset status",
"publish:all": "yarn changeset publish",
"release": "yarn build && yarn version:check && yarn publish:all",
"postinstall": "husky install"
},
"workspaces": [
Expand Down

0 comments on commit 567ca8c

Please sign in to comment.