Skip to content

Commit 406c8ce

Browse files
committed
fix: snapcraft publish fix
1 parent 3c5aa84 commit 406c8ce

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,24 @@ jobs:
7272

7373
- name: Install Snapcraft
7474
uses: samuelmeuli/action-snapcraft@v2
75-
with:
76-
snapcraft_token: ${{ secrets.SNAPCRAFT_LOGIN }}
7775

7876
- name: Install LXD
7977
run: |
8078
sudo snap install lxd
8179
sudo lxd waitready
82-
sudo lxd init --auto
80+
sudo usermod -aG lxd $user
81+
sudo chmod a+rw /var/snap/lxd/common/lxd/unix.socket
8382
8483
- name: Pack Snap
8584
run: snapcraft pack
8685

86+
- name: Snapcraft Login
87+
if: startsWith(github.ref, 'refs/tags/')
88+
run: |
89+
echo "${{ secrets.SNAPCRAFT_LOGIN }}" | base64 -d > snapcraft.creds
90+
snapcraft login --with snapcraft.creds
91+
92+
8793
- name: Upload Snap Artifact
8894
uses: actions/upload-artifact@v4
8995
with:

0 commit comments

Comments
 (0)