40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
jobs:
|
|
publish:
|
|
runs-on: docker
|
|
timeout-minutes: 20
|
|
container:
|
|
image: rust:slim
|
|
steps:
|
|
- name: Install action dependencies
|
|
run: |
|
|
apt-get install --no-install-recommends --update -y nodejs curl git
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Rust toolchain
|
|
run: |
|
|
rustup component add llvm-tools-preview
|
|
rustup component add --toolchain nightly rustfmt clippy
|
|
|
|
- name: Setup additional tooling
|
|
run: .forgejo/workflows/setup-tools.sh
|
|
|
|
- name: Build release binary
|
|
run: just full-build
|
|
- name: Calculate SHA-256 hash
|
|
run: just shasum
|
|
|
|
- name: Publish to git.jutty.dev package registry
|
|
run: |
|
|
version=$(./target/release/en --version)
|
|
api_root=https://git.jutty.dev/api
|
|
url=$api_root/packages/jutty/generic/en/$version/en-x86_64-linux-gnu
|
|
|
|
curl -fsSL \
|
|
--user jutty:${{ secrets.GJD_REGISTRY_TOKEN }} \
|
|
--upload-file target/release/en $url
|