Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pieckenst authored Nov 30, 2023
1 parent d5a5e62 commit b0d4bed
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,29 @@ jobs:
run: dotnet build --configuration Release --no-restore
- name: Publish
run: dotnet publish --runtime win-x64 --configuration Release
#▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼#

- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.3.0 # Optional fallback tag to use when no tag can be found
#▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲#
- name: Get seconds from previous tag to now
id: diff
shell: bash
env:
TIMESTAMP_TAG: ${{ steps.previoustag.outputs.timestamp }}
run: |
echo "::set-output name=timestamp-diff::$(expr $(printf '%(%s)T') - $TIMESTAMP_TAG)"

- name: 'Get next minor version'
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: Bumping Patch Index
id: bump_version_patch
uses: christian-draeger/[email protected]
with:
current-version: ${{ steps.semvers.outputs.patch }}
version-fragment: 'bug'
- name: 'Create new milestone'
id: createmilestone
uses: "WyriHaximus/github-action-create-milestone@v1"
with:
title: ${{ steps.semvers.outputs.patch }}
title: ${{ steps.bump_version_patch.outputs.next-version }}
env:
GITHUB_TOKEN: "${{ secrets.WORKFLOW_TOKEN }}"

Expand All @@ -64,7 +62,7 @@ jobs:
uses: softprops/[email protected]
# if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ steps.semvers.outputs.patch }}
tag_name: ${{ steps.bump_version_patch.outputs.next-version }}
files: "mele-launcher-bin-win.zip"
env:
GITHUB_TOKEN: "${{ secrets.WORKFLOW_TOKEN }}"
Expand Down

0 comments on commit b0d4bed

Please sign in to comment.