forked from nickbnf/glogg
-
-
Notifications
You must be signed in to change notification settings - Fork 209
154 lines (132 loc) · 5.74 KB
/
ci-release.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
name: "Make CI Release"
on:
workflow_dispatch:
inputs:
ci-run-id:
description: "Run ID of CI workflow"
required: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download artifacts for last successful CI workflow
if: ${{ !github.event.inputs.ci-run-id }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci-build.yml
workflow_conclusion: success
- name: Download artifacts for CI workflow with provided run id
if: ${{ github.event.inputs.ci-run-id }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci-build.yml
run_id: ${{ github.event.inputs.ci-run-id }}
- name: Initialize version
run: echo "KLOGG_VERSION=`cat klogg_version/klogg_version.txt`" >> $GITHUB_ENV
- name: Display structure of downloaded files
run: ls -R ./packages-*
- name: Setup Sentry CLI
uses: mathrix-education/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
token: ${{ secrets.SENTRY_TOKEN }}
organization: anton-filimonov
project: klogg
- name: Create Sentry release
shell: sh
run: |
sentry-cli releases new $KLOGG_VERSION
sentry-cli releases set-commits --auto $KLOGG_VERSION
- name: Upload symbols linux
shell: sh
run: |
xz -d ./packages-focal/klogg_focal.debug.xz
xz -d ./packages-jammy/klogg_jammy.debug.xz
xz -d ./packages-noble/klogg_noble.debug.xz
xz -d ./packages-oracle/klogg_oracle.debug.xz
xz -d ./packages-appimage/klogg_appimage.debug.xz
sentry-cli upload-dif ./packages-focal/klogg_focal.debug ./packages-focal/klogg_focal
sentry-cli upload-dif ./packages-jammy/klogg_jammy.debug ./packages-jammy/klogg_jammy
sentry-cli upload-dif ./packages-noble/klogg_noble.debug ./packages-noble/klogg_noble
sentry-cli upload-dif ./packages-oracle/klogg_oracle.debug ./packages-oracle/klogg_oracle
sentry-cli upload-dif ./packages-appimage/klogg_appimage.debug ./packages-appimage/klogg_appimage
- name: Upload symbols mac
shell: sh
run: |
sentry-cli upload-dif ./packages-macos-intel-qt6/klogg-x64.app/Contents/MacOS/klogg ./packages-macos-intel-qt6/klogg-x64.dSym
sentry-cli upload-dif ./packages-macos-arm-qt6/klogg-arm64.app/Contents/MacOS/klogg ./packages-macos-arm-qt6/klogg-arm64.dSym
- name: Upload symbols win
shell: sh
run: |
sentry-cli upload-dif ./packages-windows-x86-qt5/klogg-$KLOGG_VERSION-x86-Qt5-pdb.zip
sentry-cli upload-dif ./packages-windows-x64-qt6/klogg-$KLOGG_VERSION-x64-Qt6-pdb.zip
- name: Cleanup release artifacts
shell: sh
run: |
rm -rf ./packages-focal/klogg_focal
rm -rf ./packages-jammy/klogg_jammy
rm -rf ./packages-noble/klogg_noble
rm -rf ./packages-oracle/klogg_oracle
rm -rf ./packages-appimage/klogg_appimage
rm -rf ./packages-macos-intel-qt6/klogg-x64.app
rm -rf ./packages-macos-arm-qt6/klogg-arm64.app
mkdir ./linux-debug
mv ./packages-focal/klogg_focal.debug ./linux-debug
mv ./packages-jammy/klogg_jammy.debug ./linux-debug
mv ./packages-noble/klogg_noble.debug ./linux-debug
mv ./packages-oracle/klogg_oracle.debug ./linux-debug
mv ./packages-appimage/klogg_appimage.debug ./linux-debug
tar -cJf ./linux-debug/klogg-$KLOGG_VERSION-symbols.tar.xz ./linux-debug/*
rm ./linux-debug/*.debug
- name: Prepare binary artifacts
shell: sh
run: |
mkdir ./packages-bin
mv ./packages-appimage/klogg_deps.tar.xz ./packages-bin/klogg-$KLOGG_VERSION-deps.tar.xz
ar p ./packages-focal/klogg-$KLOGG_VERSION-focal.deb data.tar.gz > ./packages-bin/klogg-$KLOGG_VERSION-bin.tar.gz
mv ./klogg_version/klogg_version.txt ./packages-bin
- name: Prepare checksums
shell: sh
run: |
sha256sum --binary ./packages-bin/* ./packages-focal/* ./packages-jammy/* ./packages-noble/* ./packages-oracle/* ./packages-appimage/* > ./packages-bin/klogg-$KLOGG_VERSION-sha256.txt
- name: Release win
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.KLOGG_GITHUB_TOKEN }}
automatic_release_tag: continuous-win
prerelease: true
files: |
./packages-windows-x86-qt5/*
./packages-windows-x64-qt6/*
- name: Release linux
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.KLOGG_GITHUB_TOKEN }}
automatic_release_tag: continuous-linux
prerelease: true
files: |
./packages-focal/*
./packages-jammy/*
./packages-noble/*
./packages-oracle/*
./packages-appimage/*
./packages-bin/*
./linux-debug/*
- name: Release mac
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.KLOGG_GITHUB_TOKEN }}
automatic_release_tag: continuous-osx
prerelease: true
files: |
./packages-macos-intel-qt6/*
./packages-macos-arm-qt6/*
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_NEW_VERSIONS_WEBHOOK }}
DISCORD_EMBEDS: '[{"title": "Windows", "url": "https://github.com/variar/klogg/releases/tag/continuous-win"}, {"title": "Linux", "url": "https://github.com/variar/klogg/releases/tag/continuous-linux"}, {"title": "Mac", "url": "https://github.com/variar/klogg/releases/tag/continuous-osx"}]'
uses: Ilshidur/action-discord@master
with:
args: 'New CI build {{KLOGG_VERSION}} has been released!'