Merge pull request #5781 from jodh-intel/snap-fix-release

snap: Fix snapcraft setup (unbreak snap releases)
This commit is contained in:
Fabiano Fidêncio 2022-11-29 13:11:34 +01:00 committed by GitHub
commit d8d9aae123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 4 deletions

View File

@ -4,6 +4,9 @@ on:
tags: tags:
- '[0-9]+.[0-9]+.[0-9]+*' - '[0-9]+.[0-9]+.[0-9]+*'
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.snapcraft_token }}
jobs: jobs:
release-snap: release-snap:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@ -14,9 +17,16 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Install Snapcraft - name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1 run: |
with: # Required to avoid snapcraft install failure
snapcraft_token: ${{ secrets.snapcraft_token }} sudo chown root:root /
# "--classic" is needed for the GitHub action runner
# environment.
sudo snap install snapcraft --classic
# Allow other parts to access snap binaries
echo /snap/bin >> "$GITHUB_PATH"
- name: Build snap - name: Build snap
run: | run: |

View File

@ -20,7 +20,16 @@ jobs:
- name: Install Snapcraft - name: Install Snapcraft
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
uses: samuelmeuli/action-snapcraft@v1 run: |
# Required to avoid snapcraft install failure
sudo chown root:root /
# "--classic" is needed for the GitHub action runner
# environment.
sudo snap install snapcraft --classic
# Allow other parts to access snap binaries
echo /snap/bin >> "$GITHUB_PATH"
- name: Build snap - name: Build snap
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}