Files
muscl/.gitea/workflows/publish-deb.yml
h7x4 7f1221fae1
All checks were successful
Build and test / check (push) Successful in 1m55s
Build and test / build (push) Successful in 3m4s
Build and test / test (push) Successful in 3m32s
Build and test / check-license (push) Successful in 6m17s
Build and test / docs (push) Successful in 4m52s
.gitea/workflows: fix deb building args
2025-12-04 13:53:39 +09:00

79 lines
2.3 KiB
YAML

name: "publish-deb"
on:
workflow_dispatch:
inputs:
deb_version:
description: "Version to publish"
type: string
deb_revision:
description: "Debian package revision"
type: string
default: "1"
required: true
# debian_distribution
# description: "Which distribution of debian to publish for"
# type: string
# default: trixie
# required: true
# repository_component
# description: "Which apt repository component to publish for
# type: string
# default: main
# required: true
rust_toolchain:
description: "Whether to build the package with stable rust"
type: choice
options:
- stable
- nightly
- beta
default: stable
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.rust_toolchain }}
override: true
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Build deb package
run: |
CREATE_DEB_ARGS=(
${{ inputs.deb_version != "" && "--deb-version " + inputs.deb_version || "" }}
${{ inputs.deb_revision != "" && "--deb-revision " + inputs.deb_revision || "" }}
)
./create-deb.sh "${CREATE_DEB_ARGS[@]}"
- name: Upload deb package artifact
uses: actions/upload-artifact@v3
with:
name: muscl-deb.zip
path: target/debian/*.deb
if-no-files-found: error
retention-days: 30
# Already compressed
compression: 0
# This is not safely doable without either:
# - tokens scoped to the repository: https://github.com/go-gitea/gitea/issues/25900
# - automatically provisioned tokens: https://github.com/go-gitea/gitea/issues/24635
#
# - name: Publish deb package
# run: |
# curl \
# --user your_username:your_password_or_token \
# --upload-file target/debian/*.deb \
# https://git.pvv.ntnu.no/api/packages/${{ github.repository_owner }}/debian/pool/${{ inputs.debian_distribution }}/${{ inputs.repository_component }}/upload