BUILDER
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
name: Build and Publish Ratune
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "17 3 */2 * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: prunner-ubuntu
|
||||
container:
|
||||
image: mirror.gcr.io/library/archlinux:latest
|
||||
steps:
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
pacman -Syu --noconfirm
|
||||
pacman -S --needed --noconfirm \
|
||||
base-devel git curl jq namcap pacman-contrib \
|
||||
rust pkgconf alsa-lib dbus zstd
|
||||
- name: Install CA
|
||||
run: |
|
||||
curl -fsSL http://info.noko.tan/install.sh | sudo bash -s -- nokotan_ca.crt
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Check upstream release
|
||||
id: release
|
||||
run: ./scripts/check-release.sh
|
||||
- name: Build package
|
||||
if: steps.release.outputs.skip != 'true'
|
||||
run: ./scripts/build.sh "${{ steps.release.outputs.version }}" "${{ steps.release.outputs.tag }}"
|
||||
- name: Test package
|
||||
if: steps.release.outputs.skip != 'true'
|
||||
run: ./scripts/test.sh
|
||||
- name: Publish to Nexspence
|
||||
if: steps.release.outputs.skip != 'true'
|
||||
env:
|
||||
NEXSPENCE_URL: ${{ secrets.NEXSPENCE_URL }}
|
||||
NEXSPENCE_TOKEN: ${{ secrets.NEXSPENCE_TOKEN }}
|
||||
NEXSPENCE_REPOSITORY: noko-arch
|
||||
run: ./scripts/publish.sh
|
||||
- name: Record published version
|
||||
if: steps.release.outputs.skip != 'true'
|
||||
run: |
|
||||
printf '%s\n' "${{ steps.release.outputs.tag }}" > .current-version
|
||||
git config user.name "gitea-actions[bot]"
|
||||
git config user.email "gitea-actions[bot]@localhost"
|
||||
git add .current-version
|
||||
git commit -m "chore: record Ratune ${{ steps.release.outputs.tag }}" || true
|
||||
git push
|
||||
Reference in New Issue
Block a user