From 0a31a5f734c58fdbfaab3a27001affe0061ed203 Mon Sep 17 00:00:00 2001 From: jeremy-babylonlabs Date: Wed, 20 Nov 2024 15:08:49 +0800 Subject: [PATCH] update release to using reusable release workflow --- .github/workflows/release.yml | 45 +++++++++++------------------------ 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad7b3e0..69e46ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,38 +1,21 @@ -name: Release +name: publish on: push: branches: - main - -concurrency: ${{ github.workflow }}-${{ github.ref }} + - tong/add-changeset-support + workflow_dispatch: 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