-
Notifications
You must be signed in to change notification settings - Fork 28
77 lines (67 loc) · 2.26 KB
/
cd.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
# This workflow builds and publishes all releases artifacts after a release, including flatpak build files, sha256sums and more future installation methods.
name: Release
on:
#switch for debugging
# push:
# branches: [master]
release:
types: [published]
jobs:
release_flatpak_tarball:
name: Release tarball for Flathub
#create and release the tarball for flathub
runs-on: ubuntu-22.04 #this is not the same as ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install rust stable toolchain
uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-4-dev build-essential gettext desktop-file-utils valac
version: 1.0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python Dependencies
run: pip install meson ninja
#this is needed until ubuntu 22.10 is available, 22.04 does not have libadwaita 1.2
- name: Install libadwaita
shell: bash
run: |
git clone https://gitlab.gnome.org/GNOME/libadwaita.git
cd libadwaita
#use the 1.2 release commit
git checkout a905117bd2150de9e85d65f8cdce8d8fb001b89e
meson . _build
ninja -C _build
ninja -C _build install
- name: Build tarball
shell: bash
run: |
#configure meson directory
meson _builddir --prefix=/tmp
#create the tarball
meson dist -C _builddir --allow-dirty
- name: Upload Release Artifacts
uses: softprops/action-gh-release@v1
with:
files: |
_builddir/meson-dist/eyedropper-*.tar.xz
_builddir/meson-dist/eyedropper-*.tar.xz.sha256sum
draft: true
prerelease: true