From 2f396392730fa77acbdb4dba9e7c0a7e20a1a64a Mon Sep 17 00:00:00 2001 From: jeremy-babylonlabs Date: Wed, 20 Nov 2024 15:06:20 +0800 Subject: [PATCH] update release to using reuable release workflow --- .github/workflows/release.yml | 45 +++++++++++------------------------ package-lock.json | 4 ++-- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad7b3e0..90aa82e 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 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0d1cfec..46096d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "bbn-wallet-connect", + "name": "@babylonlabs-io/bbn-wallet-connect", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "bbn-wallet-connect", + "name": "@babylonlabs-io/bbn-wallet-connect", "version": "0.0.0", "dependencies": { "react-icons": "^5.3.0"