Skip to content

Commit 2a95918

Browse files
committed
Attempt to fix up release note generation and automatic milestone closing/creation in GitHub Actions
1 parent 3ca0cb9 commit 2a95918

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/new_tag.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: echo "TAGNAME=$(git describe --abbrev=0)" >> $GITHUB_OUTPUT
2121
- name: Get previous tag name
2222
id: previous_tag
23-
run: echo "TAGNAME=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_OUTPUT
23+
run: echo "TAGNAME=$(git describe --abbrev=0 ${{ steps.current_tag.outputs.TAGNAME}}^)" >> $GITHUB_OUTPUT
2424
- name: Get date
2525
id: date
2626
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
@@ -52,6 +52,7 @@ jobs:
5252
create-next-milestone:
5353
name: Create next milestone
5454
runs-on: ubuntu-latest
55+
needs: generate-release-notes
5556
steps:
5657
- uses: actions/checkout@v2
5758
with:
@@ -66,7 +67,7 @@ jobs:
6667

6768
- name: Get previous tag name
6869
id: previous_tag
69-
run: echo "TAGNAME=$(git describe --abbrev=0 HEAD^)" >> $GITHUB_OUTPUT
70+
run: echo "TAGNAME=$(git describe --abbrev=0 ${{ steps.current_tag.outputs.TAGNAME}}^)" >> $GITHUB_OUTPUT
7071

7172
- name: Get next version
7273
id: next_tag
@@ -76,9 +77,9 @@ jobs:
7677

7778
- name: Display calculated versions
7879
run: |
80+
echo "Previous version: ${{ steps.previous_tag.outputs.TAGNAME }}"
7981
echo "Current version: ${{ steps.current_tag.outputs.TAGNAME }}"
80-
echo "Previous version: ${{ steps.previous_tag.outputs.TAGNAME }}"
81-
echo "Next version: ${{ steps.next_tag.outputs.patch }}"
82+
echo "Next version: ${{ steps.next_tag.outputs.patch }}"
8283
8384
- name: Create milestone
8485
uses: "WyriHaximus/github-action-create-milestone@v1"
@@ -91,7 +92,7 @@ jobs:
9192
uses: "Beakyn/[email protected]"
9293
with:
9394
repository: ${{ github.repository }}
94-
milestone-title: ${{ steps.previous_tag.outputs.TAGNAME }}
95+
milestone-title: ${{ steps.current_tag.outputs.TAGNAME }}
9596
env:
9697
GITHUB_TOKEN: "${{ github.token }}"
9798

0 commit comments

Comments
 (0)