From d9b53e4ffbbe7068c07036996efa8b8264854654 Mon Sep 17 00:00:00 2001 From: ausias-armesto Date: Thu, 3 Oct 2024 13:16:05 +0200 Subject: [PATCH] Fix committer user on bumping version --- .github/workflows/build.yaml | 2 +- .github/workflows/release.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a53c7054..745f1afd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,7 +16,7 @@ concurrency: jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Cannot use self hosted runners because of running postgres docker container strategy: matrix: node-version: [18.x, 20.x, 22.x] diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 17ebed99..f00a98f6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,6 +33,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: main # if you want to use a different branch keep in mind that the bump version step will be affected + token: "${{ secrets.GH_RUNNER_TOKEN }}" - name: Setup Node.js uses: hoprnet/hopr-workflows/actions/setup-node-js@master @@ -85,14 +88,13 @@ jobs: - name: Bump Version id: bump run: | - npm version ${{ inputs.release_type }} -w "apps/${{ inputs.project }}" --no-git-tag-version + npm version "${{ inputs.release_type }}" -w "apps/${{ inputs.project }}" --no-git-tag-version BUMP_VERSION=$(jq -r '.version' "apps/${{ inputs.project }}/package.json") echo "bump_version=${BUMP_VERSION}" >> $GITHUB_OUTPUT - uses: EndBug/add-and-commit@v9 with: add: 'apps/${{ inputs.project}}' - default_author: github_actor new_branch: main message: 'Bump ${{ inputs.project }} version to ${{ steps.bump.outputs.bump_version }}' pathspec_error_handling: exitImmediately