lapdev-docker/.forgejo/workflows/release.yml
2025-03-17 00:02:23 -04:00

75 lines
1.8 KiB
YAML

name: Release
on:
workflow_dispatch:
inputs:
lapdev_version:
description: "Lapdev version for release"
required: true
default: "v0.1.0"
push:
tags:
- "v*"
defaults:
run:
shell: bash
working-directory: ./lapdev
env:
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
jobs:
linux:
runs-on: ubuntu-20.04
container:
image: hub.docker.com/r/liuchong/rustup:stable
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- run: cargo test --all-features
with:
components: rustfmt
- name: Update toolchain
run: |
rustup update
rustup target add wasm32-unknown-unknown
- name: Install cargo-deb
run: cargo install cargo-deb --no-default-features
- name: Install trunk
run: cargo install --locked trunk
- name: Fetch dependencies
run: cargo fetch --locked
- name: Build wasm
run: cd lapdev-dashboard && trunk build --release --public-url /static/
- name: Build lapdev-guest-agent
run: cargo build -p lapdev-enterprise --release --locked
- name: Compress static files
run: cd lapdev-dashboard/dist/ && gzip -k *
- name: Build lapdev-guest-agent
run: cargo build -p lapdev-guest-agent --release --locked
- name: Build lapdev
run: |
cargo build -p lapdev --release --locked
strip -s target/release/lapdev
- name: Build lapdev deb
run: cargo deb -p lapdev
- uses: actions/upload-artifact@v4
with:
name: lapdev-linux
path: |
./target/debian/lapdev_${{ github.event.inputs.lapdev_version }}-1_amd64.deb
./pkg/common/install.sh
retention-days: 1