-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (104 loc) · 3.34 KB
/
Copy pathworkflow.yml
File metadata and controls
125 lines (104 loc) · 3.34 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# .github/workflows/release.yml
name: Build and Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
draft: false
generate_release_notes: true
build-linux:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake git
sudo apt-get install -y libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
mv build/shellpower shellpower-linux-x64
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: shellpower-linux-x64
build-macos:
needs: create-release
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
mv build/shellpower shellpower-macos-arm64
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: shellpower-macos-arm64
build-macos-intel:
needs: create-release
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
mv build/shellpower shellpower-macos-x64
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: shellpower-macos-x64
build-windows:
needs: create-release
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
- name: Rename executable
run: Move-Item -Path "build\Release\shellpower.exe" -Destination "shellpower-windows-x64.exe"
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: shellpower-windows-x64.exe
create-checksums:
needs: [build-linux, build-macos, build-macos-intel, build-windows]
runs-on: ubuntu-latest
steps:
- name: Wait for assets to be available
run: sleep 30
- name: Download release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir release-assets
gh release download ${{ github.ref_name }} \
--repo ${{ github.repository }} \
--dir release-assets \
--pattern 'shellpower-*'
- name: Generate SHA256SUMS.txt
run: |
cd release-assets
sha256sum shellpower-* > SHA256SUMS.txt
echo "Generated checksums:"
cat SHA256SUMS.txt
- name: Upload checksums to Release
uses: softprops/action-gh-release@v2
with:
files: release-assets/SHA256SUMS.txt