mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-01 02:54:36 +02:00
build: fix snapcraft release (#38260)
Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
6f2e328c85
commit
b34a09be38
18
.github/workflows/release-nightly-snapcraft.yml
vendored
18
.github/workflows/release-nightly-snapcraft.yml
vendored
@ -13,21 +13,23 @@ jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||
|
||||
- name: Install snapcraft
|
||||
run: sudo snap install snapcraft --classic
|
||||
|
||||
- name: Authenticate snapcraft
|
||||
shell: bash
|
||||
run: snapcraft login --with <(printf '%s' "$SNAPCRAFT_STORE_CREDENTIALS")
|
||||
|
||||
- name: Remote build
|
||||
# remote-build runs on Launchpad and authenticates via a credentials file,
|
||||
# not the Snap Store credentials used by upload
|
||||
shell: bash
|
||||
env:
|
||||
LAUNCHPAD_CREDENTIALS: ${{ secrets.LAUNCHPAD_CREDENTIALS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
install -d -m 700 "$HOME/.local/share/snapcraft"
|
||||
printf '%s' "$LAUNCHPAD_CREDENTIALS" > "$HOME/.local/share/snapcraft/launchpad-credentials"
|
||||
chmod 600 "$HOME/.local/share/snapcraft/launchpad-credentials"
|
||||
snapcraft remote-build \
|
||||
--launchpad-accept-public-upload \
|
||||
--build-for=amd64,arm64,armhf
|
||||
@ -36,6 +38,8 @@ jobs:
|
||||
run: find . -maxdepth 1 -type f -name '*.snap' -print
|
||||
|
||||
- name: Upload and release snapcraft nightly build
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user