From b9d2f66b20a3b0eb9d8b32f0b1f2820817337619 Mon Sep 17 00:00:00 2001 From: wjrjerome Date: Tue, 17 Sep 2024 12:26:41 +1000 Subject: [PATCH 1/2] chore: bump release version v0.3.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e368bf..53ea259 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@babylonlabs-io/btc-staking-ts", - "version": "0.3.0-canary.10", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@babylonlabs-io/btc-staking-ts", - "version": "0.3.0-canary.10", + "version": "0.3.0", "license": "SEE LICENSE IN LICENSE", "dependencies": { "@bitcoin-js/tiny-secp256k1-asmjs": "2.2.3", diff --git a/package.json b/package.json index 2c502a9..871285b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@babylonlabs-io/btc-staking-ts", - "version": "0.3.0-canary.10", + "version": "0.3.0", "description": "Library exposing methods for the creation and consumption of Bitcoin transactions pertaining to Babylon's Bitcoin Staking protocol.", "module": "dist/index.js", "main": "dist/index.cjs", From 2c018d3c6d5c3610bdea4aeb7a9898cf2039db51 Mon Sep 17 00:00:00 2001 From: Filippos Malandrakis <35352222+filippos47@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:52:39 +0300 Subject: [PATCH 2/2] chore: Migrate CI to GH Actions (#35) --- .circleci/config.yml | 107 -------------------------- .github/workflows/ci.yml | 13 ++++ .github/workflows/publish.yaml | 19 +++++ .github/workflows/publish_canary.yaml | 14 ++++ 4 files changed, 46 insertions(+), 107 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yaml create mode 100644 .github/workflows/publish_canary.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7152b3b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,107 +0,0 @@ -version: 2.1 - -orbs: - node: circleci/node@5.2.0 - -jobs: - build_and_test: - machine: - image: ubuntu-2204:2024.01.1 - steps: - - checkout - - node/install: - node-version: '22.3' - - run: - name: Install requirements - command: npm ci - - run: - name: Run tests - command: npm run test - publish_canary: - machine: - image: ubuntu-2204:2024.01.1 - steps: - - checkout - - node/install: - node-version: '22.3' - - run: - name: Install requirements - command: npm ci - - run: - name: Authenticate with NPM registry - command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc - - run: - name: Publish canary package - command: | - npm publish --tag canary - if [ $? -ne 0 ]; then - echo "npm publish failed, stopping the job." - exit 1 - fi - validate_main_version: - machine: - image: ubuntu-2204:2024.01.1 - steps: - - checkout - - run: - name: Validate version - command: ./bin/ci_validate_version.sh - publish: - machine: - image: ubuntu-2204:2024.01.1 - resource_class: large - steps: - - checkout - - node/install: - node-version: '22.3' - - run: - name: Authenticate with NPM registry - command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc - - run: - name: Install requirements - command: npm ci - - run: - name: Publish package - command: npm publish -workflows: - CI: - jobs: - - build_and_test - - require_approval_for_canary: - type: approval - filters: - branches: - only: - - dev - - publish_canary: - requires: - - build_and_test - - require_approval_for_canary - filters: - branches: - only: - - dev - - validate_main_version: - requires: - - build_and_test - filters: - branches: - only: - - main - - require_approval: - type: approval - filters: - branches: - only: - - main - - publish: - requires: - - build_and_test - - require_approval - - validate_main_version - filters: - tags: - only: /.*/ - branches: - only: - - main \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..84c6fb0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,13 @@ +name: ci + +on: + pull_request: + branches: + - "**" + +jobs: + lint_test: + uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@push + with: + run-build: true + run-unit-tests: true diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..f217a17 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,19 @@ +name: publish + +on: + workflow_dispatch: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + lint_test: + uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@push + secrets: inherit + with: + run-build: true + run-unit-tests: true + publish: true + publish-command: | + ./bin/ci_validate_version.sh + npm publish diff --git a/.github/workflows/publish_canary.yaml b/.github/workflows/publish_canary.yaml new file mode 100644 index 0000000..5de7058 --- /dev/null +++ b/.github/workflows/publish_canary.yaml @@ -0,0 +1,14 @@ +name: publish_canary + +on: + workflow_dispatch: + +jobs: + lint_test: + uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@push + secrets: inherit + with: + run-build: true + run-unit-tests: true + publish: true + publish-command: 'npm publish --tag canary'