44 tags :
55 - " v*"
66 - " b*"
7+ branches :
8+ - main
9+ - master
10+ workflow_dispatch :
711
812jobs :
913 build :
1014 runs-on : ${{ matrix.os }}
1115 strategy :
1216 matrix :
13- os : [ubuntu-latest , windows-2022 ]
17+ os : [ubuntu-22.04 , windows-latest ]
1418 steps :
1519 - name : Checkout repository
1620 uses : actions/checkout@v4
@@ -20,26 +24,31 @@ jobs:
2024 - name : Set up Python
2125 uses : actions/setup-python@v4
2226 with :
23- python-version : " 3.x "
27+ python-version : " 3.13 "
2428
2529 - name : Install dependencies
2630 run : pip install -r requirements.txt
2731
2832 - name : Build with PyInstaller
2933 run : pyinstaller GoSubtitle.spec
3034
31- - name : Archive Linux Build
32- if : matrix.os == 'ubuntu-latest'
35+ - name : Copy required files to dist
3336 run : |
34- tar -czvf GoSubtitle_linux_portable_amd64.tar.gz -C dist .
35- mv GoSubtitle_linux_portable_amd64.tar.gz dist/
37+ cp readme.md dist/
38+ cp LICENSE dist/
3639
3740 - name : Archive Windows Build
38- if : matrix.os == 'windows-2022 '
41+ if : matrix.os == 'windows-latest '
3942 run : |
40- powershell -Command "Compress-Archive -Path dist/* -DestinationPath GoSubtitle_win_portable_amd64.zip"
43+ zip -r GoSubtitle_win_portable_amd64.zip dist/
4144 mv GoSubtitle_win_portable_amd64.zip dist/
4245
46+ - name : Archive Linux Build
47+ if : matrix.os == 'ubuntu-22.04'
48+ run : |
49+ tar -czvf GoSubtitle_linux_portable_amd64.tar.gz -C dist .
50+ mv GoSubtitle_linux_portable_amd64.tar.gz dist/
51+
4352 - name : Upload artifact
4453 uses : actions/upload-artifact@v4
4554 with :
5059 changelog :
5160 runs-on : ubuntu-latest
5261 needs : build
62+ if : startsWith(github.ref, 'refs/tags/')
5363 outputs :
5464 changelog : ${{ steps.extract.outputs.changelog }}
5565 steps :
6777 release :
6878 runs-on : ubuntu-latest
6979 needs : changelog
80+ if : startsWith(github.ref, 'refs/tags/')
7081 steps :
7182 - name : Download all artifacts
7283 uses : actions/download-artifact@v4
0 commit comments