Skip to content

Commit d738026

Browse files
authored
refactor CI
1 parent f0907d0 commit d738026

File tree

1 file changed

+57
-16
lines changed

1 file changed

+57
-16
lines changed

.github/workflows/blank.yml

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,94 @@
1-
name: htop AppImage
1+
name: Appimage
22
concurrency:
33
group: build-${{ github.ref }}
44
cancel-in-progress: true
55

66
on:
77
schedule:
8-
- cron: "0 16 1/14 * *"
8+
- cron: "0 16 1/21 * *"
99
workflow_dispatch:
10-
1110
jobs:
1211
build:
13-
runs-on: ubuntu-latest
12+
name: "${{ matrix.name }} (${{ matrix.arch }})"
13+
runs-on: ${{ matrix.runs-on }}
14+
strategy:
15+
matrix:
16+
include:
17+
- runs-on: ubuntu-latest
18+
name: "Build AppImage"
19+
arch: x86_64
20+
# - runs-on: ubuntu-24.04-arm
21+
# name: "Build AppImage"
22+
# arch: aarch64
1423
steps:
1524
- uses: actions/checkout@v4
1625

17-
- name: build
26+
- name: Make AppImage
1827
run: |
1928
sudo apt update
2029
sudo apt install libsensors-dev libdrm-dev libudev-dev libncursesw5-dev \
2130
file libcap-dev ninja-build autotools-dev autoconf automake \
2231
build-essential meson desktop-file-utils zsync
2332
24-
chmod a+x ./*-appimage.sh && ./*-appimage.sh
33+
chmod +x ./*-appimage.sh
34+
./*-appimage.sh
2535
mkdir dist
2636
mv *.AppImage* dist/
2737
2838
- name: Upload artifact
29-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@v4.6.2
3040
with:
31-
name: htop.AppImage
41+
name: AppImage-${{ matrix.arch }}
3242
path: 'dist'
33-
43+
44+
- name: Upload version file
45+
uses: actions/[email protected]
46+
with:
47+
name: version
48+
path: ~/version
49+
overwrite: true
50+
3451
release:
3552
needs: [build]
3653
permissions: write-all
3754
runs-on: ubuntu-latest
3855

3956
steps:
40-
- uses: actions/download-artifact@v4
57+
- uses: actions/download-artifact@v4.3.0
4158
with:
42-
name: htop.AppImage
59+
name: AppImage-x86_64
60+
61+
# - uses: actions/[email protected]
62+
# with:
63+
# name: AppImage-aarch64
4364

44-
- name: release
45-
uses: marvinpinto/action-automatic-releases@latest
65+
- uses: actions/[email protected]
4666
with:
47-
title: Continuous build
48-
automatic_release_tag: continuous
67+
name: version
68+
69+
- name: Read version and Get date
70+
run: |
71+
echo "VERSION=$(cat version)" >> "${GITHUB_ENV}"
72+
echo "DATE=$(date +'%Y-%m-%d_%s')" >> "${GITHUB_ENV}"
73+
74+
- name: Release Artifacts
75+
uses: softprops/[email protected]
76+
with:
77+
name: "htop: ${{ env.VERSION }}"
78+
tag_name: "${{ env.VERSION }}@${{ env.DATE }}"
4979
prerelease: false
5080
draft: false
81+
generate_release_notes: false
82+
make_latest: true
5183
files: |
5284
*.AppImage*
53-
repo_token: ${{ secrets.GITHUB_TOKEN }}
85+
86+
- uses: actions/checkout@v4
87+
- name: Update LATEST_VERSION
88+
run: |
89+
echo "${{ env.VERSION }}" > ./LATEST_VERSION
90+
git config user.name "github-actions[bot]"
91+
git config user.email "github-actions[bot]@users.noreply.github.com"
92+
git add ./LATEST_VERSION
93+
git commit -m 'bump `LATEST_VERSION` [skip ci]'
94+
git push

0 commit comments

Comments
 (0)