Skip to content

Commit f2d5a91

Browse files
authored
Create stable.yml
1 parent 434d291 commit f2d5a91

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

.github/workflows/stable.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Build Azahar (Stable)
2+
concurrency:
3+
group: build-stable-${{ github.ref }}
4+
cancel-in-progress: true
5+
6+
on:
7+
schedule:
8+
- cron: "0 14 * * 0"
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
build:
13+
name: "${{ matrix.name }} (${{ matrix.arch }})"
14+
runs-on: ${{ matrix.runs-on }}
15+
strategy:
16+
matrix:
17+
include:
18+
- runs-on: ubuntu-latest
19+
optimized: false
20+
name: "Azahar build (Normal)"
21+
arch: x86_64
22+
- runs-on: ubuntu-latest
23+
optimized: true
24+
name: "Azahar Build (Optimized)"
25+
arch: x86_64
26+
- runs-on: ubuntu-24.04-arm
27+
name: "Azahar build (Normal)"
28+
optimized: false
29+
arch: aarch64
30+
container: ghcr.io/pkgforge-dev/archlinux:latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
35+
36+
- name: Install dependencies
37+
if: always()
38+
run: chmod +x ./get-dependencies.sh && ./get-dependencies.sh
39+
40+
- name: Compile Azahar (Normal)
41+
if: ${{ matrix.optimized == false }}
42+
run: |
43+
chmod +x ./azahar-appimage.sh && ./azahar-appimage.sh
44+
mkdir -p dist
45+
mv *.AppImage* dist/
46+
47+
- name: Compile Azahar (Optimized)
48+
if: ${{ matrix.optimized == true }}
49+
run: |
50+
chmod +x ./azahar-appimage.sh && ./azahar-appimage.sh v3
51+
mkdir -p dist
52+
mv *.AppImage* dist/
53+
54+
- name: Upload artifact
55+
uses: actions/[email protected]
56+
with:
57+
name: azahar-${{ matrix.optimized && 'optimized' || 'normal' }}-appimage-${{ matrix.arch }}
58+
path: "dist"
59+
60+
- name: Check version file
61+
if: ${{ matrix.optimized == false }}
62+
run: |
63+
cat ~/version
64+
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"
65+
66+
- name: Upload version file
67+
uses: actions/[email protected]
68+
with:
69+
name: version
70+
path: ~/version
71+
overwrite: true
72+
73+
release:
74+
name: "release"
75+
needs: [build]
76+
permissions:
77+
actions: read
78+
security-events: write
79+
contents: write
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/[email protected]
83+
with:
84+
name: azahar-optimized-appimage-x86_64
85+
86+
- uses: actions/[email protected]
87+
with:
88+
name: azahar-normal-appimage-x86_64
89+
90+
- uses: actions/[email protected]
91+
with:
92+
name: azahar-normal-appimage-aarch64
93+
94+
- uses: actions/[email protected]
95+
with:
96+
name: version
97+
98+
- name: Read version
99+
run: |
100+
export VERSION="$(cat version)"
101+
export SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')"
102+
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
103+
echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}"
104+
105+
- name: Del Previous Release
106+
run: |
107+
gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y
108+
sleep 5
109+
env:
110+
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
111+
continue-on-error: true
112+
113+
- name: Continuous Releaser
114+
uses: softprops/action-gh-release@v2
115+
with:
116+
name: "Azahar AppImage ${{ env.APP_VERSION }}"
117+
tag_name: "${{ env.APP_VERSION }}"
118+
prerelease: false
119+
draft: false
120+
generate_release_notes: false
121+
make_latest: true
122+
files: |
123+
*.AppImage*
124+
125+
- name: Snapshot Releaser
126+
uses: softprops/action-gh-release@v2
127+
with:
128+
name: "Snapshot ${{ env.APP_VERSION }}"
129+
tag_name: "${{ env.SNAPSHOT_TAG }}"
130+
prerelease: false
131+
draft: false
132+
generate_release_notes: false
133+
make_latest: false
134+
files: |
135+
*.AppImage*

0 commit comments

Comments
 (0)