Skip to content

Commit fe92fa7

Browse files
authored
Merge pull request #913 from Swordfish90/feature/improve-workflows
Replace workflows with a single one which is triggered on tags.
2 parents 403bb11 + eba69d3 commit fe92fa7

3 files changed

Lines changed: 129 additions & 106 deletions

File tree

.github/workflows/build-appimage.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/build-dmg.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
tags:
10+
- '*'
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
build-appimage:
17+
name: Build (Linux, AppImage)
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Install build deps
25+
run: |
26+
sudo apt update
27+
sudo apt install -y build-essential rsync wget
28+
29+
- name: Install Qt
30+
uses: jurplel/install-qt-action@v4
31+
with:
32+
version: 6.10.0
33+
dir: ..
34+
modules: qt5compat qtshadertools
35+
setup-python: false
36+
cache: true
37+
38+
- name: Build AppImage
39+
run: |
40+
./scripts/build-appimage.sh
41+
42+
- name: Collect artifact
43+
run: |
44+
mkdir -p release
45+
mv ./*.AppImage release/
46+
47+
- name: Upload artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: cool-retro-term-appimage
51+
path: ./release/*
52+
53+
build-dmg:
54+
name: Build (macOS, DMG)
55+
runs-on: macos-14
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
submodules: recursive
60+
61+
- name: Install Qt
62+
uses: jurplel/install-qt-action@v4
63+
with:
64+
version: 6.10.*
65+
modules: qt5compat qtshadertools
66+
setup-python: true
67+
python-version: '3.11'
68+
cache: true
69+
70+
- name: Build DMG
71+
run: |
72+
JOBS="$(sysctl -n hw.ncpu)"
73+
./scripts/build-dmg.sh
74+
75+
- name: Collect artifact
76+
run: |
77+
mkdir -p release
78+
mv ./*.dmg release/
79+
80+
- name: Upload artifact
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: cool-retro-term-dmg
84+
path: ./release/*
85+
86+
release:
87+
name: Create Release
88+
runs-on: ubuntu-22.04
89+
needs:
90+
- build-appimage
91+
- build-dmg
92+
steps:
93+
- uses: actions/checkout@v4
94+
with:
95+
fetch-depth: 0
96+
97+
- name: Download AppImage
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: cool-retro-term-appimage
101+
path: ./release
102+
103+
- name: Download DMG
104+
uses: actions/download-artifact@v4
105+
with:
106+
name: cool-retro-term-dmg
107+
path: ./release
108+
109+
- name: Update rolling tag
110+
if: startsWith(github.ref, 'refs/heads/')
111+
run: |
112+
git tag -f rolling
113+
git push -f origin rolling
114+
115+
- name: Publish rolling release
116+
if: startsWith(github.ref, 'refs/heads/')
117+
uses: softprops/action-gh-release@v2
118+
with:
119+
tag_name: rolling
120+
name: Rolling Release
121+
prerelease: true
122+
files: ./release/*
123+
124+
- name: Publish tagged release
125+
if: startsWith(github.ref, 'refs/tags/')
126+
uses: softprops/action-gh-release@v2
127+
with:
128+
tag_name: ${{ github.ref_name }}
129+
files: ./release/*

0 commit comments

Comments
 (0)