mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-25 16:08:46 +09:00
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>
42 lines
961 B
YAML
42 lines
961 B
YAML
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
|