-
Notifications
You must be signed in to change notification settings - Fork 22
39 lines (38 loc) · 1.71 KB
/
build-snap.yml
File metadata and controls
39 lines (38 loc) · 1.71 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
name: Build snap
on:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Install Dependencies
# run: |
# sudo apt install -y snapd
# sudo snap install --classic snapcraft
# # It would be ideal to add current user to the lxd group, but that's not easy in GHA
# sudo lxd init --auto
# sudo chmod -R o+r ${{github.workspace}}
# sudo chown -R :lxd ${{github.workspace}}
# - name: Patch snapcraft.yaml
# run: |
# echo We want to build from the current branch not re-pull from git.
# sed -i 's#source: https://github.com/FaithLife-Community/OuDedetai.git#source: https://github.com/FaithLife-Community/OuDedetai.git\n source-commit: ${{ github.sha }}#' snap/snapcraft.yaml
# sed -zi 's#override-pull: |\n craftctl default\n craftctl set version=$(git describe --tag)#override-pull: |\n craftctl default\n craftctl set version=dev-$(git rev-parse --short HEAD)#' snap/snapcraft.yaml
# - name: Debug information
# run: |
# sudo ls -al ${{github.workspace}}
# sudo ls -al ${{github.workspace}}/ou_dedetai/assets
# cat snap/snapcraft.yaml
# - name: Build snap
# working-directory: snap
# run: |
# sudo snapcraft || (echo "dumping failure log:";sudo bash -c 'cat /root/.local/state/snapcraft/log/*.log'; exit 1)
# ls -al
- uses: canonical/action-build@v1
id: snapcraft
- name: Upload snap
uses: actions/upload-artifact@v4
with:
name: oudedetai-${{ github.sha }}.snap
path: ${{ steps.snapcraft.outputs.snap }}