Added flag to disable TTS warning for those that are getting the warning but TTS works #173
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
pull_request: | |
types: [closed] | |
workflow_dispatch: | |
concurrency: | |
group: release | |
jobs: | |
release: | |
if: | | |
github.event_name != 'pull_request' || | |
( | |
github.event.pull_request.merged == true && | |
contains(github.event.pull_request.labels.*.name, 'release') | |
) | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: false # change to true when building benchmarks | |
- name: Setup env | |
uses: ./.github/actions/setup_env | |
- name: Build & Zip exe | |
id: build_zip | |
shell: powershell | |
run: | | |
python build.py | |
$version = python -c "from src import __version__; print(__version__)" | |
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
$folderName = "d4lf_v" + $version | |
Compress-Archive -Path $folderName -DestinationPath "$folderName.zip" | |
- name: Create Tag | |
shell: powershell | |
run: | | |
git tag "v${{ env.VERSION }}" | |
git push origin "v${{ env.VERSION }}" | |
- name: Check if beta | |
id: check_beta | |
shell: powershell | |
run: | | |
if ($env:VERSION -like "*beta*" -or $env:VERSION -like "*alpha*") { | |
echo "IS_BETA=true" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 | |
} else { | |
echo "IS_BETA=false" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 | |
} | |
- name: Release | |
id: release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: d4lf_v*.zip | |
generate_release_notes: true | |
name: "v${{ env.VERSION }}" | |
prerelease: ${{ env.IS_BETA == 'true' }} | |
tag_name: "v${{ env.VERSION }}" | |
- name: Send message to Discord | |
shell: powershell | |
run: | | |
$webhookUrl = "${{ secrets.DISCORD_WEBHOOK }}" | |
$payload = @{ | |
username = "GitHub" | |
content = "**D4LF v${{ env.VERSION }}**`n`nRelease Page: <${{ steps.release.outputs.url }}>" | |
allowed_mentions = @{ | |
parse = @() | |
} | |
} | ConvertTo-Json | |
Invoke-RestMethod -Uri $webhookUrl -Method Post -ContentType "application/json" -Body $payload | |
# Also not working, have a request out here: https://github.com/SethCohen/github-releases-to-discord/issues/29 | |
# # From: https://github.com/SethCohen/github-releases-to-discord | |
# - name: Github Releases To Discord | |
# uses: SethCohen/github-releases-to-discord@master | |
# with: | |
# webhook_url: ${{ secrets.DISCORD_WEBHOOK }} | |
# color: "2105893" | |
# username: "D4LF Release" | |
# Not currently working, but I have an issue out for it: https://github.com/nhevia/discord-styled-releases/issues/12 | |
# - name: Sending message to Discord with release notes | |
# uses: nhevia/discord-styled-releases@main | |
# with: | |
# webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
# webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} |