From 8f6e842d2754bde78f06c0c77035e7849b4e84cf Mon Sep 17 00:00:00 2001 From: Enrique Llorente Pastora Date: Thu, 3 Feb 2022 12:09:33 +0100 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf2e69f8c6..030c1e6094 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,12 +25,21 @@ jobs: release: runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory + - name: Check out code from ${{ github.event.inputs.baseBranch }} uses: actions/checkout@v2 with: ref: ${{ github.event.inputs.baseBranch }} fetch-depth: 0 - - name: Pull latest of latest branch - run: git pull --ff-only --rebase origin ${{ github.event.inputs.baseBranch }} - - name: Tag a ${{ github.event.inputs.versionLevel }} version - run: make version-${{ github.event.inputs.versionLevel }} + - name: Retrieve last tag + uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + - name: Bump version with level ${{ github.event.inputs.baseBranch }} + uses: actions-ecosystem/action-bump-semver@v1 + id: bump-semver + with: + current_version: ${{ steps.get-latest-tag.outputs.tag }} + level: ${{ github.event.inputs.versionLevel }} + - name: Push the new version + uses: actions-ecosystem/action-push-tag@v1 + with: + tag: ${{ steps.bump-semver.outputs.new_version }}