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 f552976 commit 51044e3
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,28 @@ jobs:
git config --global user.email '[email protected]'
- name: Create and Push Tag
if: github.event_name == 'workflow_dispatch' # MANUAL RELEASE TRIGGER
if: github.event_name == 'workflow_dispatch' && runner.os == 'Windows' # MANUAL RELEASE TRIGGER
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ github.workspace }}/contrib
$TAG_NAME="release-" + (Get-Date -Format "yyyyMMddHHmmss")
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
git tag $TAG_NAME
git push origin $TAG_NAME
shell: 'pwsh'

- name: Create and Push Tag
if: github.event_name == 'workflow_dispatch' && runner.os != 'Windows' # MANUAL RELEASE TRIGGER
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ github.workspace }}/contrib
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
}
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' }}
shell: 'bash'

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

0 comments on commit 51044e3

Please sign in to comment.