-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update release to using reuable release workflow
- Loading branch information
1 parent
945a005
commit 86f149d
Showing
2 changed files
with
19 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,25 @@ | ||
name: Release | ||
name: publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- tong/add-changeset-support | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# - name: Send a Slack notification if a publish happens | ||
# if: steps.changesets.outputs.published == 'true' | ||
# You can do something when a publish happens. | ||
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!" | ||
lint_test: | ||
uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@hiep/add-changeset | ||
secrets: inherit | ||
with: | ||
run-build: true | ||
run-unit-tests: false | ||
run-changesets: true | ||
publish: ${{ github.event_name == 'workflow_dispatch' }} | ||
publish-command: | | ||
./bin/ci_validate_version.sh | ||
npm run release |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.