Skip to content

Commit ff87016

Browse files
authored
ci: add lxd (#365)
1 parent cea98e7 commit ff87016

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,16 @@ jobs:
6565
with:
6666
go-version: "1.26.1"
6767

68-
- name: Install Snapcraft
69-
run: sudo snap install snapcraft --classic
70-
71-
- name: Clean Snapcraft cache
68+
- name: Install Snapcraft and LXD
7269
run: |
73-
sudo rm -rf /home/runner/.cache/snapcraft || true
74-
sudo rm -rf /root/.cache/snapcraft || true
75-
sudo rm -rf ~/.cache/snapcraft || true
76-
mkdir -p /home/runner/.cache/snapcraft/download
77-
mkdir -p /home/runner/.cache/snapcraft/stage-packages
78-
chmod -R 755 /home/runner/.cache/snapcraft
70+
sudo snap install snapcraft --classic
71+
sudo snap install lxd
72+
sudo lxd init --auto
73+
sudo usermod -aG lxd $USER
7974
8075
- name: Build and publish snap
8176
env:
8277
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
8378
run: |
84-
snapcraft pack --destructive-mode
79+
sg lxd -c 'snapcraft pack'
8580
snapcraft upload --release=stable *.snap

0 commit comments

Comments
 (0)