Skip to content

Commit

Permalink
Fixed the release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AllRWeak authored and at3rva committed Nov 24, 2023
1 parent 7d90fea commit e7f566d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Creating a new release and changelog
name: Releasing a new version...

on:
push:
Expand All @@ -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
3 changes: 0 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7f566d

Please sign in to comment.