diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index dd559be..5b55475 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -13,6 +13,12 @@ jobs: steps: - name: Checkout repository code uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # needed to use yarn v4 + - name: Enable corepack + run: corepack enable - name: Install Node uses: actions/setup-node@v4 @@ -24,4 +30,11 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - yarn version --new-version ${{ github.event.inputs.bump }} + yarn version ${{ github.event.inputs.bump }} + git add --all + + - name: Commit & Push changes + uses: devops-infra/action-commit-push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + commit_message: "chore: bump version" diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 353cc89..8903904 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -1,14 +1,13 @@ -name: publish-package +name: Publish Package on: workflow_dispatch: - inputs: - newversion: - description: 'Semantic Version Bump Type (major minor patch)' - required: true + push: + branches: + - main jobs: - release-please: + publish-package: runs-on: ubuntu-latest steps: - name: Checkout repository code @@ -20,19 +19,11 @@ jobs: node-version: "20.10.0" registry-url: https://registry.npmjs.org/ - # - name: Build - # run: | - # yarn install --immutable --immutable-cache --check-cache - # yarn build - # yarn pack - - - name: Version and publish to npm - id: npm-bump - uses: bcomnes/npm-bump@v2 - with: - git_email: github-actions@github.com - git_username: github-actions - newversion: ${{ github.event.inputs.newversion }} - push_version_commit: true - github_token: ${{ secrets.GITHUB_TOKEN }} - npm_token: ${{ secrets.NPM_ACCESS_TOKEN }} + - name: Build & Publish + run: | + yarn install --immutable --immutable-cache --check-cache + yarn build + yarn pack + yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} diff --git a/package.json b/package.json index 627f367..90be8d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@test117/rpc-handler", - "version": "1.0.0", + "version": "1.0.1", "description": "Uses Chainlist's RPC collection racing them returning the lowest latency RPC", "main": "dist/cjs/rpc-handler.js", "module": "dist/esm/rpc-handler.js", @@ -84,5 +84,6 @@ "extends": [ "@commitlint/config-conventional" ] - } + }, + "packageManager": "yarn@4.2.2" }