forked from KDAB/hotspot
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 2.83 KB
/
release-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
name: Create latest release
on:
push:
branches:
- 'master'
- '1.*'
env:
CONTINUOUS_BUILD: ${{ github.ref_name == 'master' }}
jobs:
latest-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Bundle sources artifacts
run: |
version=$(git describe --tags | sed -En 's/(v[0-9\.]+)-.*/\1/p')
cp -r . "hotspot-${version}"
tar czf "hotspot-perfparser-${version}.tar.gz" --exclude=.git "hotspot-${version}/3rdparty/perfparser"
zip -r "hotspot-perfparser-${version}.zip" "hotspot-${version}/3rdparty/perfparser" -x "hotspot-${version}/3rdparty/perfparser/.git"
tar czf "hotspot-PrefixTickLabels-${version}.tar.gz" --exclude=.git "hotspot-${version}/3rdparty/PrefixTickLabels"
zip -r "hotspot-PrefixTickLabels-${version}.zip" "hotspot-${version}/3rdparty/PrefixTickLabels" -x "hotspot-${version}/3rdparty/PrefixTickLabels/.git"
tar czf "hotspot-${version}.tar.gz" --exclude=".git,perfparser,PrefixTickLabels" "hotspot-${version}"
zip -r "hotspot-${version}.zip" "hotspot-${version}" -x "hotspot-${version}/3rdparty/" -x "hotspot-${version}/.git"
rm -rf "hotspot-${version}"
- name: Build
uses: docker://ghcr.io/kdab/kdesrc-build:latest
- name: Delete latest release
if: ${{ env.CONTINUOUS_BUILD }}
run: |
gh release delete continuous --cleanup-tag || true
env:
GH_TOKEN: ${{ github.token }}
- name: Rename artifacts
run: |
cd ${{ github.workspace }} && mv hotspot-*.AppImage hotspot-continuous.AppImage
cd ${{ github.workspace }} && mv hotspot-debuginfo-*.tar.bz2 hotspot-debuginfo-continuous.tar.bz2
- name: Create latest release
uses: ncipollo/release-action@v1
if: ${{ env.CONTINUOUS_BUILD }}
with:
name: "continuous"
tag: "continuous"
prerelease: true
body: "The newest version directly from the master branch. THIS IS BLEEDING ENDGE AND WILL MOST LIKELY CONTAIN UNKOWN BUGS."
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: |
${{ github.workspace }}/hotspot-debuginfo-*
${{ github.workspace }}/hotspot-perfparser-v*
${{ github.workspace }}/hotspot-PrefixTickLabels-v*
${{ github.workspace }}/hotspot-v*
${{ github.workspace }}/*.AppImage
- name: Release latest release
if: ${{ env.CONTINUOUS_BUILD }}
run: |
gh release edit continuous --draft=false || true
env:
GH_TOKEN: ${{ github.token }}
- name: Create release PR
uses: googleapis/[email protected]
if: ${{ ! env.CONTINUOUS_BUILD }}
with:
token: ${{ github.token }}
release-type: simple
target-branch: ${{ github.ref_name }}