From e7f566dce86336aa4153e86fa40410b446c7e8fd Mon Sep 17 00:00:00 2001 From: Allar Viik Date: Fri, 24 Nov 2023 18:09:35 +0200 Subject: [PATCH] Fixed the release workflow --- .github/workflows/release.yml | 17 ++++++----------- .github/workflows/version.yml | 3 --- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1155b144..8d2d23b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Creating a new release and changelog +name: Releasing a new version... on: push: @@ -9,32 +9,27 @@ on: workflow_dispatch: jobs: - version_changelog_relase: + version_collection_and_tag: runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Cloning repo... uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.WORKFLOWS_PAT }} - - name: Getting current version and generating changelog + - name: Generating changelog contents... run: | TARGET_FILE="nova/core/galaxy.yml" CURRENT_VERSION=$(cat nova/core/galaxy.yml | grep version: | cut -d " " -f 2) - echo $CURRENT_VERSION echo "LATEST_TAG=$CURRENT_VERSION" >> $GITHUB_ENV - # Getting upstream tags - git fetch --tags https://github.com/novateams/nova.core - git push --tags - # Creating temp changelog file git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 HEAD^^)..HEAD > CHANGELOG.md - - uses: ncipollo/release-action@v1 + - name: Generating a new release... + uses: ncipollo/release-action@v1 with: tag: "v${{ env.LATEST_TAG }}" bodyFile: CHANGELOG.md diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 2d1827f6..fe5c4389 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -39,9 +39,6 @@ jobs: version_row_new="version: $major.$minor.$patch_new" sed -i "s/$version_row_old/$version_row_new/" $target_file - TAG_NAME="v$major.$minor.$patch_new" - echo "LATEST_TAG=$TAG_NAME" >> $GITHUB_ENV - # Adding the changed file to git git add $target_file