-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (63 loc) · 1.87 KB
/
Copy pathrelease.yml
File metadata and controls
68 lines (63 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
distribution:
name: Build sdist and wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
- run: pip install build
- run: python -m build
- uses: actions/upload-artifact@v7
with:
name: python-distribution
path: dist/*
windows-executable:
name: Build Windows executable
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Build
run: pyinstaller --noconfirm ConvertAll.spec
- name: Package
run: Compress-Archive -Path dist/ConvertAll/* -DestinationPath ConvertAll-windows.zip
- uses: actions/upload-artifact@v7
with:
name: windows-executable
path: ConvertAll-windows.zip
publish:
name: Publish the GitHub release
runs-on: ubuntu-latest
needs: [distribution, windows-executable]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v8
with:
path: artifacts
- name: Attach the build outputs to the release
uses: softprops/action-gh-release@v3
with:
files: |
artifacts/python-distribution/*
artifacts/windows-executable/*
generate_release_notes: true
body: |
See [CHANGELOG.md](https://github.com/alirisner14/ConvertAll/blob/main/CHANGELOG.md)
for the full list of changes in this release.