Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
timosachsenberg authored Apr 16, 2024
1 parent 29868fd commit f552976
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ github.workspace }}/contrib
TAG_NAME="release-$(date +'%Y%m%d%H%M%S')"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV # Save the tag name to an environment variable
if (${{ runner.os }} -eq 'Windows') {
$TAG_NAME="release-" + (Get-Date -Format "yyyyMMddHHmmss")
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
} else {
TAG_NAME="release-$(date +'%Y%m%d%H%M%S')"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
}
git tag $TAG_NAME
git push origin $TAG_NAME
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}

# TODO hope that they finally release a decent uploading action.
- name: Clean build
Expand Down

0 comments on commit f552976

Please sign in to comment.