Skip to content

Commit

Permalink
ci: fix bug in release
Browse files Browse the repository at this point in the history
  • Loading branch information
David MICHENEAU committed May 6, 2024
1 parent 1f1b7bd commit 25cea50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changelog-newversion:
needs: [release-app, pre-check]
needs: [release-app, golangci-lint, pre-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.3
Expand All @@ -163,16 +163,17 @@ jobs:
- name: Update Changelog Header
run: |
CHANGELOG_FILE_NAME="CHANGELOG.md"
PREVIOUS_RELEASE_TAG=${{ github.ref_name }}
RELEASE_TAG=${{ needs.pre-check.outputs.TAG_NAME }}
# PREVIOUS_RELEASE_TAG=${{ github.ref_name }}
# Add Release Date
RELEASE_DATE=`date +%B' '%e', '%Y`
sed -i -e "1 s/.*Unreleased.*/## ${PREVIOUS_RELEASE_TAG#v} ($RELEASE_DATE)/" $CHANGELOG_FILE_NAME
sed -i -e "1 s/.*Unreleased.*/## ${RELEASE_TAG#v} ($RELEASE_DATE)/" $CHANGELOG_FILE_NAME
# Prepend next release line
echo Previous release is: $PREVIOUS_RELEASE_TAG
echo Previous release is: $RELEASE_TAG
NEW_RELEASE_LINE=$(echo $PREVIOUS_RELEASE_TAG | awk -F. '{
NEW_RELEASE_LINE=$(echo $RELEASE_TAG | awk -F. '{
$1 = substr($1,2)
$2 += 1
printf("%s.%01d.0\n\n", $1, $2);
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## ain.1.0 (Unreleased)
## main (March 27, 2024)
## 0.1.0 (Unreleased)
## 0.0.11 (March 27, 2024)

### :tada: **Improvements**

Expand Down

0 comments on commit 25cea50

Please sign in to comment.