Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release workflow #1345

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,28 @@ jobs:
- name: suite
run: ${{ matrix.command }}
working-directory: ${{ matrix.dir }}

# https://github.com/changesets/action
release:
name: Release
timeout-minutes: 10
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- test

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: ./.github/actions/setup
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
title: 'Release Preview'
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 @@ -26,6 +26,7 @@
]
},
"scripts": {
"release": "changeset publish",
"clean": "git clean -x -f",
"compile": "tsc",
"lint": "concurrently 'yarn:lint:*'",
Expand Down