Skip to content

Commit d3f5b32

Browse files
committed
improve workflow
1 parent 5c2bea3 commit d3f5b32

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

.github/workflows/release.yaml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,26 @@ jobs:
1717
runs-on: windows-latest
1818
steps:
1919
- uses: actions/checkout@v3
20+
2021
- name: Set up Python
2122
uses: actions/setup-python@v4
2223
with:
2324
python-version: "3.10"
25+
2426
- name: Install dependencies
25-
run: pip install -r requirements.txt
27+
run: |
28+
pip install -r requirements.txt
29+
pip install -U "https://yt-dlp.github.io/Pyinstaller-Builds/x86_64/pyinstaller-6.7.0-py3-none-any.whl"
30+
2631
- name: Build application
2732
working-directory: ./app
2833
run: |
2934
pyinstaller --name=yt-dlp-gui --clean -y app.py --icon ./ui/assets/yt-dlp-gui.ico --noconsole
3035
Compress-Archive -Path dist/* -DestinationPath yt-dlp-gui-win64.zip
31-
- uses: actions/upload-artifact@v2
32-
with:
33-
name: yt-dlp-gui-win
34-
path: ./app/yt-dlp-gui-win64.zip
35-
36-
github-release:
37-
name: github-release
38-
runs-on: ubuntu-latest
39-
needs:
40-
- build-windows
41-
steps:
42-
- uses: actions/checkout@v3
43-
44-
- name: Restore windows build
45-
uses: actions/download-artifact@v3
46-
with:
47-
name: yt-dlp-gui-win
48-
path: /opt/builds
4936
5037
- name: Get version
51-
run: echo "VERSION=$(grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' ./app/version.py)" >> $GITHUB_ENV
38+
working-directory: ./app
39+
run: echo "VERSION=$(python -c "from version import __version__; print(__version__)")" | Out-File -FilePath $env:GITHUB_ENV -Append
5240

5341
- name: Create Release
5442
uses: softprops/action-gh-release@v1
@@ -59,4 +47,4 @@ jobs:
5947
draft: false
6048
prerelease: false
6149
files: |
62-
/opt/builds/yt-dlp-gui-win64.zip
50+
./app/yt-dlp-gui-win64.zip

0 commit comments

Comments
 (0)