mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-09 16:50:34 +00:00
trivial: use github actions to build snaps
This commit is contained in:
parent
2dea742004
commit
32994d236c
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
@ -74,6 +74,13 @@ jobs:
|
||||
echo $GITHUB_WORKSPACE
|
||||
docker run --privileged -e CI=true -t -v $GITHUB_WORKSPACE:/github/workspace docker.pkg.github.com/fwupd/fwupd/fwupd-${{matrix.os}}:latest
|
||||
|
||||
snap:
|
||||
uses: ./.github/workflows/snap.yml
|
||||
with:
|
||||
deploy: ${{ github.event_name }} == "push'
|
||||
channel: edge
|
||||
secrets: inherit
|
||||
|
||||
macos:
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
|
13
.github/workflows/snap-stable.yml
vendored
Normal file
13
.github/workflows/snap-stable.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
name: Publish to snap stable channel
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
snap:
|
||||
uses: ./.github/workflows/snap.yml
|
||||
with:
|
||||
deploy: true
|
||||
channel: stable
|
||||
secrets: inherit
|
38
.github/workflows/snap.yml
vendored
Normal file
38
.github/workflows/snap.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Snap workflow
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
channel:
|
||||
required: true
|
||||
type: string
|
||||
deploy:
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
build-snap:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: snapcore/action-build@v1
|
||||
id: snapcraft
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: snap
|
||||
path: ${{ steps.snapcraft.outputs.snap }}
|
||||
|
||||
deploy-store:
|
||||
needs: build-snap
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.perform_deploy }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: snap
|
||||
- uses: snapcore/action-publish@v1
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
|
||||
with:
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
release: ${{ inputs.channel }}
|
Loading…
Reference in New Issue
Block a user