Add package to release workflow
This commit is contained in:
1 parent
b65af50996
commit
c719916612
1 file changed
+39
@@ -40,6 +40,45 @@ jobs:
|
|||||||
VER="${GITHUB_REF_NAME#v}"
|
VER="${GITHUB_REF_NAME#v}"
|
||||||
dart tool/release_publish.dart "$GITHUB_REF_NAME" "dist/watch-together-$VER-linux-x64.tar.gz"
|
dart tool/release_publish.dart "$GITHUB_REF_NAME" "dist/watch-together-$VER-linux-x64.tar.gz"
|
||||||
|
|
||||||
|
arch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux:latest
|
||||||
|
steps:
|
||||||
|
- name: Install Arch build deps
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm --needed base-devel clang cmake flutter git \
|
||||||
|
gtk3 libepoxy mpv ninja pkgconf
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
run: |
|
||||||
|
git init -q .
|
||||||
|
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||||
|
git fetch -q --tags origin "$GITHUB_SHA"
|
||||||
|
git checkout -q --force FETCH_HEAD
|
||||||
|
|
||||||
|
- name: Build Arch package
|
||||||
|
run: |
|
||||||
|
useradd --create-home builder
|
||||||
|
chown -R builder .
|
||||||
|
runuser -u builder -- sh -c \
|
||||||
|
'cd deploy/arch && makepkg --cleanbuild --noconfirm --nodeps'
|
||||||
|
|
||||||
|
- name: Publish Arch package
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
TOKEN="${RELEASE_TOKEN:-${GITHUB_TOKEN:-$GITEA_TOKEN}}"
|
||||||
|
test -n "$TOKEN"
|
||||||
|
set -- deploy/arch/*.pkg.tar.zst
|
||||||
|
test -f "$1"
|
||||||
|
curl --fail --show-error --request PUT \
|
||||||
|
--header "Authorization: token $TOKEN" \
|
||||||
|
--upload-file "$1" \
|
||||||
|
"$GITHUB_API_URL/packages/$GITHUB_REPOSITORY_OWNER/arch/core/x86_64"
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
# yuuka-windows: host-mode runner (no containers), runs as SYSTEM, has
|
# yuuka-windows: host-mode runner (no containers), runs as SYSTEM, has
|
||||||
# git + VS 2022 Build Tools but no bash/python — PowerShell and Dart
|
# git + VS 2022 Build Tools but no bash/python — PowerShell and Dart
|
||||||
|
|||||||
Reference in new issue
Block a user