Skip to content

Commit 90b1294

Browse files
committed
CI: add snap.yml
1 parent 809bf71 commit 90b1294

5 files changed

Lines changed: 61 additions & 6 deletions

File tree

.github/workflows/appimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
outputs:
88
name:
99
description: "The artifact name"
10-
value: ${{ jobs.build_ubuntu.outputs.name }}
10+
value: ${{ jobs.build_appimage.outputs.name }}
1111

1212
env:
1313
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
uses: ./.github/workflows/flatpak.yml
3737
secrets: inherit
3838

39+
snap:
40+
uses: ./.github/workflows/snap.yml
41+
secrets: inherit
42+
3943
docker:
4044
uses: ./.github/workflows/docker.yml
4145
secrets: inherit
@@ -63,7 +67,7 @@ jobs:
6367
deploy:
6468
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
6569
runs-on: ubuntu-latest
66-
needs: [linux, docker, flatpak, msvc, doxygen, android, macos]
70+
needs: [linux, docker, flatpak, snap, msvc, doxygen, android, macos]
6771
steps:
6872
- name: Checkout Repository
6973
uses: actions/checkout@v3
@@ -113,6 +117,13 @@ jobs:
113117
path: ${{ env.artifact_path }}
114118
merge-multiple: true
115119

120+
- name: Download snap
121+
uses: actions/download-artifact@v4
122+
with:
123+
pattern: ${{ needs.snap.outputs.name }}*
124+
path: ${{ env.artifact_path }}
125+
merge-multiple: true
126+
116127
- name: Download msvc
117128
uses: actions/download-artifact@v4
118129
with:

.github/workflows/flatpak.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
outputs:
77
name:
88
description: "The artifact name"
9-
value: ${{ jobs.build_android.outputs.name }}
9+
value: ${{ jobs.build_flatpak.outputs.name }}
1010

1111
jobs:
1212
build_flatpak:
@@ -19,7 +19,7 @@ jobs:
1919
os: ubuntu-24.04-arm
2020

2121
env:
22-
artifact_name: RabbitRemoteControl
22+
artifact_name: build_flatpak
2323
RabbitRemoteControl_VERSION: v0.0.36
2424

2525
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
outputs:
88
name:
99
description: "The artifact name"
10-
value: ${{ jobs.build_ubuntu.outputs.name }}
10+
value: ${{ jobs.build_linux.outputs.name }}
1111

1212
env:
1313
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -25,7 +25,7 @@ jobs:
2525
PACKAGE: appimage
2626
- os: ubuntu-22.04-arm
2727
PACKAGE: appimage
28-
28+
2929
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
3030
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
3131
# See: https://github.com/actions/runner-images/

.github/workflows/snap.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Author: Kang Lin <kl222@126.com>
2+
3+
name: snap
4+
5+
on:
6+
workflow_call:
7+
outputs:
8+
name:
9+
description: "The artifact name"
10+
value: ${{ jobs.build_snap.outputs.name }}
11+
12+
jobs:
13+
build_snap:
14+
env:
15+
artifact_name: build_snap
16+
RabbitRemoteControl_VERSION: v0.0.36
17+
18+
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
19+
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
20+
# See: https://github.com/actions/runner-images/
21+
runs-on: ubuntu-latest
22+
23+
# Map the job outputs to step outputs
24+
outputs:
25+
name: ${{ env.artifact_name }}
26+
27+
steps:
28+
- name: Check out Git repository
29+
uses: actions/checkout@v3
30+
31+
- name: Install Snapcraft
32+
uses: samuelmeuli/action-snapcraft@v3
33+
34+
# You can now run Snapcraft shell commands
35+
- name: Build snap
36+
run: |
37+
sg lxd -c 'snapcraft --use-lxd'
38+
39+
- name: Update artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: ${{ env.artifact_name }}
43+
path: |
44+
${{github.workspace}}/*.snap

0 commit comments

Comments
 (0)