-
-
Notifications
You must be signed in to change notification settings - Fork 621
158 lines (154 loc) · 5.06 KB
/
publish-appimage.yml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Build AppImage
on:
push:
branches:
- main
tags:
- v*
paths-ignore:
- web/**
- doc/**
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
arch:
- x86_64
permissions:
contents: write
discussions: write
steps:
- run: sudo apt-get -qq update
- name: Install dependencies
run: |
sudo apt-get install -yqq --no-install-recommends \
audacious-dev \
cmake \
gawk \
gperf \
lcov \
libaudclient-dev \
libcairo2-dev \
libcurl4-gnutls-dev \
libdbus-glib-1-dev \
libfuse2 \
libglib2.0-dev \
libical-dev \
libimlib2-dev \
libircclient-dev \
libiw-dev \
liblua5.3-dev \
libmicrohttpd-dev \
libmysqlclient-dev \
libpulse-dev \
librsvg2-dev \
libsystemd-dev \
libwayland-bin \
libwayland-dev \
libx11-dev \
libxdamage-dev \
libxext-dev \
libxft-dev \
libxinerama-dev \
libxml2-dev \
libxmmsclient-dev \
libxnvctrl-dev \
ncurses-dev \
ninja-build \
pandoc \
wayland-protocols
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
cache-dependency-path: 'requirements-dev.txt'
- run: pip install -r requirements-dev.txt
- name: Import GPG Deploy Key
# only run on main branch
if: github.ref == 'refs/heads/main'
run: |
echo "${{ secrets.GPG_DEPLOY_KEY }}" > appimage/secret.gpg
gpg --import appimage/secret.gpg
- name: Set clang version to 12 for ubuntu-20.04
if: matrix.os == 'ubuntu-20.04'
run: |
echo "CLANG_VERSION=12" | tee -a $GITHUB_ENV
- name: Set clang version to 15 for ubuntu-22.04
if: matrix.os == 'ubuntu-22.04'
run: |
echo "CLANG_VERSION=15" | tee -a $GITHUB_ENV
- name: Set clang version to 18 for ubuntu-24.04
if: matrix.os == 'ubuntu-24.04'
run: |
echo "CLANG_VERSION=18" | tee -a $GITHUB_ENV
- name: Install libc++, set CC and CXX env vars
run: |
sudo apt-get install -yqq --no-install-recommends \
libc++-${CLANG_VERSION}-dev \
libc++abi-${CLANG_VERSION}-dev
echo "CC=clang-${CLANG_VERSION}" | tee -a $GITHUB_ENV
echo "CXX=clang++-${CLANG_VERSION}" | tee -a $GITHUB_ENV
- name: Build AppImage
run: ./appimage/build.sh
env:
RELEASE: "${{ startsWith(github.ref, 'refs/tags/') && 'ON' || 'OFF' }}"
- run: ./conky-x86_64.AppImage --version # print version
- name: Set CONKY_VERSION
run: echo "CONKY_VERSION=$(./conky-x86_64.AppImage --short-version)" | tee -a $GITHUB_ENV
- run: mv conky-x86_64.AppImage conky-${{ matrix.os }}-${{ matrix.arch }}-v${{ env.CONKY_VERSION }}.AppImage
- run: mv conky-x86_64.AppImage.sha256 conky-${{ matrix.os }}-${{ matrix.arch }}-v${{ env.CONKY_VERSION }}.AppImage.sha256
- name: Upload AppImage artifact
uses: actions/upload-artifact@v4
with:
path: 'conky-${{ matrix.os }}-${{ matrix.arch }}-v${{ env.CONKY_VERSION }}.AppImage'
name: 'conky-${{ matrix.os }}-${{ matrix.arch }}-v${{ env.CONKY_VERSION }}.AppImage'
if-no-files-found: error
- name: Upload AppImage checksum artifact
uses: actions/upload-artifact@v4
with:
path: 'conky-${{ matrix.os }}-${{ matrix.arch }}-v${{ env.CONKY_VERSION }}.AppImage.sha256'
name: 'conky-${{ matrix.os }}-${{ matrix.arch }}-v${{ env.CONKY_VERSION }}.AppImage.sha256'
if-no-files-found: error
- name: Upload man page artifact
uses: actions/upload-artifact@v4
with:
name: conky.1.gz
path: conky.1.gz
# conky.1.gz is created by all jobs!
overwrite: true
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/artifacts
- name: Create Conky Release
id: create_release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
draft: false
prerelease: false
discussion_category_name: General
generate_release_notes: true
fail_on_unmatched_files: true
files: |
${{ github.workspace }}/artifacts/**/*