forked from boehs/Lightly
-
Notifications
You must be signed in to change notification settings - Fork 23
119 lines (107 loc) · 3.69 KB
/
darkly-ci.yml
File metadata and controls
119 lines (107 loc) · 3.69 KB
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
# Build Darkly and publish release
name: Darkly build & release
on:
push:
tags:
- "v*"
env:
BUILD_REPO: https://github.com/Bali10050/Darkly
jobs:
release-ci:
runs-on: ubuntu-24.04
outputs:
VERSION: ${{ steps.step_getlatest_tag.outputs.VERSION }}
ASSET: ${{ steps.step_get_asset.outputs.ASSET }}
steps:
- name: Checkout local
uses: actions/checkout@v4.2.0
with:
repository: ${{ github.repository }}
sparse-checkout: |
.github/workflows
- name: Install build dependencies
run: sudo apt-get install git -y -qq
- name: Get latest Darkly release tag
id: step_getlatest_tag
run: |
# get latest release tag from remote
latest_tag=$(git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags $BUILD_REPO '*.*' \
| tail --lines=1 | cut --delimiter='/' --fields=3)
echo "INFO: Latest tag = $latest_tag"
test ! -z "$latest_tag" && echo "LATEST_TAG=$latest_tag" >> "$GITHUB_ENV" \
|| echo "ERROR: Latest tag not found" || exit 1
# use the tag name but remove the 'v' for the asset name to publish
tagname=$(echo $latest_tag | sed 's/v//')
echo "VERSION=$tagname" >> "$GITHUB_OUTPUT"
- name: Download tag asset
id: step_get_asset
run: |
curl -L $BUILD_REPO/archive/refs/tags/${{ env.LATEST_TAG }}.tar.gz --output darkly-${{ env.LATEST_TAG }}.tar.gz
echo "ASSET=darkly-${{ env.LATEST_TAG }}.tar.gz" >> "$GITHUB_OUTPUT"
- uses: actions/cache/save@v4
id: cache
with:
path: ${{ steps.step_get_asset.outputs.ASSET }}
key: ${{ runner.os }}-v${{ steps.step_getlatest_tag.outputs.VERSION }}-${{ hashFiles(steps.step_get_asset.outputs.ASSET) }}
- name: Save version
run: echo ${{ steps.step_get_artifact.outputs.VERSION }} > VERSION
- name: Upload version
uses: actions/upload-artifact@v5
with:
name: VERSION
path: VERSION
retention-days: 1
Debian:
needs: release-ci
uses: ./.github/workflows/debian14.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
Kubuntu:
needs: release-ci
uses: ./.github/workflows/kubuntu.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
openSUSE-Tumbleweed:
needs: release-ci
uses: ./.github/workflows/opensuse-tw.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
KDE-Neon:
needs: release-ci
uses: ./.github/workflows/neon.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
Fedora:
needs: release-ci
uses: ./.github/workflows/fedora.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
containers: "['fedora:42','fedora:43']"
Archlinux:
needs: release-ci
uses: ./.github/workflows/archlinux.yml
with:
version: ${{ needs.release-ci.outputs.VERSION }}
Flatpak:
needs: release-ci
uses: ./.github/workflows/flatpak.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
release:
uses: ./.github/workflows/release.yml
needs:
[
"archlinux",
"fedora",
"opensuse-tumbleweed",
"kde-neon",
"debian",
"flatpak",
'kubuntu',
]