Debian Codegraph @

.github/workflows/pyinstaller-release-draft.yml

raw
1 # GitHub Action for drafting a release from PyInstaller builds
2
3 name: PyInstaller Draft Release
4
5 on:
6 workflow_dispatch:
7 inputs:
8 tag:
9 description: 'Tag for the draft release (e.g., v0.4.3)'
10 required: true
11 target_commitish:
12 description: 'Branch or commit for the tag (default: master)'
13 required: false
14 default: 'master'
15 prerelease:
16 description: 'Mark as prerelease'
17 required: false
18 type: boolean
19 default: false
20
21 concurrency:
22 group: ${{ github.workflow }}-${{ github.ref }}
23 cancel-in-progress: true
24
25 env:
26 PYTHON_VERSION: '3.11'
27 PYINSTALLER_VERSION: '6.3.0'
28
29 jobs:
30 build-linux:
31 uses: ./.github/workflows/pyinstaller-linux.yml
32
33 build-windows:
34 uses: ./.github/workflows/pyinstaller-windows.yml
35
36 build-macos-intel:
37 uses: ./.github/workflows/pyinstaller-macos-intel.yml
38
39 build-macos-silicon:
40 uses: ./.github/workflows/pyinstaller-macos-silicon.yml
41
42 prepare-artifacts:
43 name: Prepare Artifacts
44 needs: [build-linux, build-windows, build-macos-intel, build-macos-silicon]
45 runs-on: ubuntu-latest
46 timeout-minutes: 10
47 steps:
48 - name: Download all artifacts
49 uses: actions/download-artifact@v4
50 with:
51 path: artifacts
52
53 - name: Prepare release assets
54 run: |
55 mkdir -p release
56 cp artifacts/dirsearch-linux-amd64-threaded/dirsearch-linux-amd64-threaded release/
57 cp artifacts/dirsearch-linux-amd64-async/dirsearch-linux-amd64-async release/
58 cp artifacts/dirsearch-windows-x64-threaded/dirsearch-windows-x64-threaded.exe release/
59 cp artifacts/dirsearch-windows-x64-async/dirsearch-windows-x64-async.exe release/
60 cp artifacts/dirsearch-macos-intel-threaded/dirsearch-macos-intel-threaded release/
61 cp artifacts/dirsearch-macos-intel-async/dirsearch-macos-intel-async release/
62 cp artifacts/dirsearch-macos-silicon-threaded/dirsearch-macos-silicon-threaded release/
63 cp artifacts/dirsearch-macos-silicon-async/dirsearch-macos-silicon-async release/
64
65 # Create checksums
66 cd release
67 sha256sum * > SHA256SUMS.txt
68 cat SHA256SUMS.txt
69
70 - name: Upload combined artifacts
71 uses: actions/upload-artifact@v4
72 with:
73 name: dirsearch-all-platforms
74 path: release/
75 retention-days: 30
76
77 release:
78 name: Draft Release
79 needs: [prepare-artifacts]
80 runs-on: ubuntu-latest
81 timeout-minutes: 10
82 permissions:
83 contents: write
84 steps:
85 - name: Download combined artifacts
86 uses: actions/download-artifact@v4
87 with:
88 name: dirsearch-all-platforms
89 path: release
90
91 - name: Create GitHub Draft Release
92 uses: softprops/action-gh-release@v2
93 with:
94 files: |
95 release/dirsearch-linux-amd64-threaded
96 release/dirsearch-linux-amd64-async
97 release/dirsearch-windows-x64-threaded.exe
98 release/dirsearch-windows-x64-async.exe
99 release/dirsearch-macos-intel-threaded
100 release/dirsearch-macos-intel-async
101 release/dirsearch-macos-silicon-threaded
102 release/dirsearch-macos-silicon-async
103 release/SHA256SUMS.txt
104 generate_release_notes: true
105 draft: true
106 prerelease: ${{ inputs.prerelease }}
107 tag_name: ${{ inputs.tag }}
108 target_commitish: ${{ inputs.target_commitish }}