From 7c50c353780f910a49bac1e16ecbab74585b0de3 Mon Sep 17 00:00:00 2001 From: Caio Ricciuti Date: Sat, 18 May 2024 18:42:59 +0200 Subject: [PATCH] update release worker --- .github/workflows/release.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f66acd..bbef0bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,14 +19,13 @@ jobs: git config --global user.email caio.ricciuti@outlook.com - name: Get current version - id: vars run: | set -e # Fail on first error - # Extract the latest tag, or default to v0.0.0 - latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` || echo "v0.0.0") + # Extract the latest tag, or default to v1.0.0 + latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` || echo "v1.0.0") echo "Latest tag: $latest_tag" - echo "::set-output name=latest_tag::$latest_tag" + echo "latest_tag=$latest_tag" >> $GITHUB_ENV # Split the tag into parts IFS='.' read -r -a parts <<< "${latest_tag//v/}" @@ -38,22 +37,21 @@ jobs: new_patch=$((patch + 1)) new_tag="v$major.$minor.$new_patch" echo "New tag: $new_tag" - echo "::set-output name=new_tag::$new_tag" + echo "new_tag=$new_tag" >> $GITHUB_ENV - name: Create new tag run: | set -e # Fail on first error - new_tag=${{ steps.vars.outputs.new_tag }} - git tag $new_tag - git push origin $new_tag + git tag ${{ env.new_tag }} + git push origin ${{ env.new_tag }} - name: Create GitHub release uses: actions/create-release@v1 with: - tag_name: ${{ steps.vars.outputs.new_tag }} - release_name: ${{ steps.vars.outputs.new_tag }} - body: "Automated release for tag ${{ steps.vars.outputs.new_tag }}" + tag_name: ${{ env.new_tag }} + release_name: ${{ env.new_tag }} + body: "Automated release for tag ${{ env.new_tag }}" draft: false prerelease: false - token: ${{ secrets.GHCR_PAT_PUB_RELEASE }} + token: ${{ secrets.GHCR_PAT }} \ No newline at end of file