mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-16 09:53:24 +09:00
build(snap): publish nightly version to snapcraft via actions (#37814)
The secret is added to the repo already. Right now this only publishes commits to main branch to the "latest/edge" snap channel, but if this is successful we can add more workflows/logic to be able to publish RCs/fully tagged versions too. --------- Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
co-authored by
Nicolas
parent
f95c210abe
commit
12fcd78e8e
@@ -0,0 +1,41 @@
|
|||||||
|
name: release-nightly-snapcraft
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
|
- name: Install snapcraft
|
||||||
|
run: sudo snap install snapcraft --classic
|
||||||
|
|
||||||
|
- name: Remote build
|
||||||
|
run: |
|
||||||
|
snapcraft remote-build \
|
||||||
|
--launchpad-accept-public-upload \
|
||||||
|
--build-for=amd64,arm64,armhf
|
||||||
|
|
||||||
|
- name: List built snaps
|
||||||
|
run: find . -maxdepth 1 -type f -name '*.snap' -print
|
||||||
|
|
||||||
|
- name: Upload and release snapcraft nightly build
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
for snap in ./*.snap; do
|
||||||
|
echo "Uploading $snap to edge"
|
||||||
|
snapcraft upload --release="latest/edge" "$snap"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user