Skip to content

Commit

Permalink
update release to using reuable release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-babylonlabs committed Nov 20, 2024
1 parent 945a005 commit 86f149d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 32 deletions.
47 changes: 17 additions & 30 deletions .github/workflows/release.yml
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 86f149d

Please sign in to comment.