aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/snap.yaml
blob: e68908355c86113a0992eb8a31c4f4a242d32580 (plain) (blame)
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
name: snap
on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    concurrency:
      group: snap-build
      cancel-in-progress: true
    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0
    - uses: snapcore/action-build@v1
      id: build-snap
    # Make sure the snap is installable
    - run: |
        sudo apt -y remove sosreport
        sudo snap install --classic --dangerous ${{ steps.build-snap.outputs.snap }}
        sudo snap alias sosreport.sos sos
    # Do some testing with the snap
    - run: |
        sudo sos help
    - uses: snapcore/action-publish@v1
      env:
        SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
      with:
        snap: ${{ steps.build-snap.outputs.snap }}
        release: "latest/edge"