Skip to content

Commit

Permalink
Attempt to fix up release note generation and automatic milestone clo…
Browse files Browse the repository at this point in the history
…sing/creation in GitHub Actions
  • Loading branch information
cmsj committed Mar 12, 2023
1 parent 3ca0cb9 commit 2a95918
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/new_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: echo "TAGNAME=$(git describe --abbrev=0)" >> $GITHUB_OUTPUT
- name: Get previous tag name
id: previous_tag
run: echo "TAGNAME=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_OUTPUT
run: echo "TAGNAME=$(git describe --abbrev=0 ${{ steps.current_tag.outputs.TAGNAME}}^)" >> $GITHUB_OUTPUT
- name: Get date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -52,6 +52,7 @@ jobs:
create-next-milestone:
name: Create next milestone
runs-on: ubuntu-latest
needs: generate-release-notes
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -66,7 +67,7 @@ jobs:

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

- name: Get next version
id: next_tag
Expand All @@ -76,9 +77,9 @@ jobs:

- name: Display calculated versions
run: |
echo "Previous version: ${{ steps.previous_tag.outputs.TAGNAME }}"
echo "Current version: ${{ steps.current_tag.outputs.TAGNAME }}"
echo "Previous version: ${{ steps.previous_tag.outputs.TAGNAME }}"
echo "Next version: ${{ steps.next_tag.outputs.patch }}"
echo "Next version: ${{ steps.next_tag.outputs.patch }}"
- name: Create milestone
uses: "WyriHaximus/github-action-create-milestone@v1"
Expand All @@ -91,7 +92,7 @@ jobs:
uses: "Beakyn/gha-close-milestone@v1.1.1"
with:
repository: ${{ github.repository }}
milestone-title: ${{ steps.previous_tag.outputs.TAGNAME }}
milestone-title: ${{ steps.current_tag.outputs.TAGNAME }}
env:
GITHUB_TOKEN: "${{ github.token }}"

0 comments on commit 2a95918

Please sign in to comment.