From 06ede015a18b6a234347e443985c90e5bd5e326a Mon Sep 17 00:00:00 2001 From: Frangeris Peguero Date: Thu, 3 Oct 2024 23:24:59 -0300 Subject: [PATCH] fix: Merge bump - publish workflows (#10) * Move bump code back into publish workflow * Added name to step --- .github/workflows/bump.yml | 44 ----------------------------------- .github/workflows/publish.yml | 8 +++++++ 2 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/bump.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml deleted file mode 100644 index f885e7c..0000000 --- a/.github/workflows/bump.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: bump -run-name: Bump package version - -on: - push: - tags: - - "*" - workflow_run: - workflows: ["publish"] - types: - - completed - -jobs: - bump: - name: Bump - runs-on: ubuntu-22.04 - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - cache: "npm" - node-version: 22 - registry-url: "https://registry.npmjs.org" - - - name: Get tag version - id: get_version - run: | - VERSION_TAG=${GITHUB_REF#refs/tags/} - echo "VERSION=${VERSION_TAG}" >> $GITHUB_ENV - - - name: Update package.json - run: npm version ${{ env.VERSION }} --no-git-tag-version --allow-same-version - - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - branch: main - commit_author: Github Actions - commit_message: "bump: Upgrade version to ${{ env.VERSION }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e17aca4..bac8bc2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,8 @@ jobs: runs-on: ubuntu-22.04 permissions: id-token: write + contents: write + steps: - name: Checkout uses: actions/checkout@v4 @@ -32,6 +34,12 @@ jobs: - name: Update package.json run: npm version ${{ env.VERSION }} --no-git-tag-version --allow-same-version + - name: Bump version + uses: stefanzweifel/git-auto-commit-action@v5 + with: + branch: main + commit_message: "bump: Upgrade version to ${{ env.VERSION }}" + - name: Install dependencies run: npm ci