Skip to content

1.2.5pre5 提供DPI锁定 PreRelease #122

1.2.5pre5 提供DPI锁定 PreRelease

1.2.5pre5 提供DPI锁定 PreRelease #122

Workflow file for this run

name: Auto Release Action
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
env:
Version: Init
Release: Init
isPreRelease: true
ChangeLog: Init
CommitMessage: Init
NotSkip: true
jobs:
AutoRelease:
name: Auto Release
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Version & Set GITHUB_ENV
run: |
$vc = "${{ github.event.head_commit.message }}" -split " "
echo "$vc"
echo "Version=$($vc[0])" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CommitMessage=$($vc[1])" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if ( $vc[2] -eq 'Release' ){
$release = $vc[0] -replace "rc"," Release "
echo 'isPreRelease=false' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo (Get-Content ./changelog.txt)
}elseif( $vc[2] -eq 'NotRelease' ){
$release = $vc[0] -replace "pre"," NotRelease "
echo "NotSkip=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}else{
$release = $vc[0] -replace "pre"," PreRelease "
echo (Get-Content ./changelog.txt)
}
echo "Release=$release" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo $release
- name: Set up Python
if: ${{ env.NotSkip == 'true'}}
uses: actions/setup-python@v4
with:
python-version: '3.11.5'
- name: Python Pip Install
if: ${{ env.NotSkip == 'true'}}
uses: logikal-code/[email protected]
# - name: Clean up PATH
# uses: egor-tensin/cleanup-path@v3
# - name: Set up MinGW
# id: setup
# uses: egor-tensin/setup-mingw@v2
# with:
# version: '12.2.0'
# - name: Build SavDecode.dll
# run: |
# & '${{ steps.setup.outputs.gxx }}' --version
- name: Dist NoConsole ${{ env.Version }} Compress Version
if: ${{ env.NotSkip == 'true'}}
run: |
pyinstaller --distpath ./NoCLI/ -D -i ./musync_data/Musync.ico ./MusyncSavDecodeGUI.py -w --clean
Compress-Archive -LiteralPath ./NoCLI/MusyncSavDecodeGUI/ -DestinationPath ("./MusyncSavDecodeGUI_NoConsole_${{ env.Version }}.zip")
- name: Dist NoConsole ${{ env.Version }} AllInOne Version
if: ${{ env.NotSkip == 'true'}}
run: |
pyinstaller --distpath ./ -F -i ./musync_data/Musync.ico ./MusyncSavDecodeGUI.py -w
Rename-Item -Path ./MusyncSavDecodeGUI.exe -NewName ("MusyncSavDecodeGUI_NoConsole_${{ env.Version }}_AllInOne.exe")
- name: Dist WithConsole ${{ env.Version }} Compress Version
if: ${{ env.NotSkip == 'true'}}
run: |
pyinstaller --distpath ./WithCLI/ -D -i ./musync_data/Musync.ico ./MusyncSavDecodeGUI.py
Compress-Archive -LiteralPath ./WithCLI/MusyncSavDecodeGUI/ -DestinationPath ("./MusyncSavDecodeGUI_WithConsole_${{ env.Version }}.zip")
- name: Dist WithConsole ${{ env.Version }} AllInOne Version
if: ${{ env.NotSkip == 'true'}}
run: |
pyinstaller --distpath ./ -F -i ./musync_data/Musync.ico ./MusyncSavDecodeGUI.py
Rename-Item -Path ./MusyncSavDecodeGUI.exe -NewName ("MusyncSavDecodeGUI_WithConsole_${{ env.Version }}_AllInOne.exe")
- name: Commit Release
if: ${{ env.NotSkip == 'true'}}
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
name: ${{ env.Release }} ${{ env.CommitMessage }} < Auto Release >
tag_name: ${{ env.Version }}
draft: false
body_path: ${{ github.workspace }}/changelog.txt
prerelease: ${{ env.isPreRelease }}
files: |
./MusyncSavDecodeGUI_NoConsole_${{ env.Version }}.zip
./MusyncSavDecodeGUI_NoConsole_${{ env.Version }}_AllInOne.exe
./MusyncSavDecodeGUI_WithConsole_${{ env.Version }}.zip
./MusyncSavDecodeGUI_WithConsole_${{ env.Version }}_AllInOne.exe