2828 with :
2929 name : coverage
3030 path : coverage.txt
31+
3132 codecov :
3233 runs-on : ubuntu-latest
3334 needs : test
@@ -43,45 +44,18 @@ jobs:
4344 files : ./coverage.txt
4445 fail_ci_if_error : true
4546
46- build-gnome-extension :
47+ release-keylightd :
4748 runs-on : ubuntu-latest
4849 needs : test
4950 steps :
5051 - name : Checkout code
5152 uses : actions/checkout@v4
52-
53- - name : Install dependencies
54- run : |
55- sudo apt-get update
56- sudo apt-get install -y make zip
57-
58- - name : Build extension
59- run : |
60- cd contrib/gnome-extension
61- make zip
62-
63- - name : Upload extension artifact
64- uses : actions/upload-artifact@v4
6553 with :
66- name : gnome-extension
67- path : dist/gnome-extension/keylightd-control@jmylchreest.github.io.shell-extension.zip
68-
69- release-keylightd :
70- runs-on : ubuntu-latest
71- needs : build-gnome-extension
72- steps :
73- - name : Checkout code
74- uses : actions/checkout@v4
54+ fetch-depth : 0
7555
7656 - name : Set up Go
7757 uses : actions/setup-go@v5
7858
79- - name : Download gnome-extension artifact
80- uses : actions/download-artifact@v4
81- with :
82- name : gnome-extension
83- path : dist/gnome-extension/keylightd-control@jmylchreest.github.io.shell-extension.zip
84-
8559 - name : Run GoReleaser (release)
8660 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
8761 uses : goreleaser/goreleaser-action@v6
@@ -100,4 +74,40 @@ jobs:
10074 version : latest
10175 args : release --clean --snapshot
10276 env :
103- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
77+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78+
79+ build-gnome-extension :
80+ runs-on : ubuntu-latest
81+ needs : release-keylightd
82+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
83+ steps :
84+ - name : Checkout code
85+ uses : actions/checkout@v4
86+
87+ - name : Install dependencies
88+ run : |
89+ sudo apt-get update
90+ sudo apt-get install -y make zip
91+
92+ - name : Build extension
93+ run : |
94+ cd contrib/gnome-extension
95+ make zip
96+
97+ - name : Get Current Release
98+ id : get_current_release
99+ uses : joutvhu/get-release@v1
100+ with :
101+ debug : true
102+ env :
103+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104+
105+ - name : Upload Release Asset
106+ uses : actions/upload-release-asset@v1
107+ env :
108+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
109+ with :
110+ upload_url : ${{ steps.get_current_release.outputs.upload_url }}
111+ asset_path : ./dist/gnome-extension/keylightd-control@jmylchreest.github.io.shell-extension.zip
112+ asset_name : keylightd-control@jmylchreest.github.io.shell-extension.zip
113+ asset_content_type : application/zip
0 commit comments