workflow
This commit is contained in:
parent
2e823188ba
commit
4ed90bb103
45
.gitea/workflows/release-deb.yaml
Normal file
45
.gitea/workflows/release-deb.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
name: sdlan release push
|
||||
run-name: ${{ gitea.actor }} is building release 🚀
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash --login -eo pipefail {0}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Add Path
|
||||
run: |
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
echo "$HOME/tools/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
|
||||
- name: TAG推送自动编译
|
||||
id: compile
|
||||
shell: bash
|
||||
working-directory: /usr/local/gitea-workflow/workspace/sdlan-lib-rs
|
||||
run: |
|
||||
flock -n build.lock -c '
|
||||
git pull
|
||||
rm -rf /usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/x86_64-unknown-linux-musl/debian/*.deb || true
|
||||
rm -rf /usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/aarch64-unknown-linux-musl/debian/*.deb || true
|
||||
cargo deb --target x86_64-unknown-linux-musl --deb-revision="2-static"
|
||||
cargo deb --target aarch64-unknown-linux-musl --deb-revision="2-static"
|
||||
echo "built=true" >> $GITHUB_OUTPUT
|
||||
' || {
|
||||
echo "其他编译正在进行中,跳过本次执行"
|
||||
echo "built=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
}
|
||||
|
||||
- name: Upload Release Assets
|
||||
if: steps.compile.outputs.built == 'true'
|
||||
#uses: softprops/action-gh-release@v3
|
||||
uses: workflow-actions/action-gh-release@v3
|
||||
with:
|
||||
files: |
|
||||
/usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/x86_64-unknown-linux-musl/debian/*.deb
|
||||
/usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/aarch64-unknown-linux-musl/debian/*.deb
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,4 +15,5 @@ sdlan.exe
|
||||
/ca
|
||||
.access_token
|
||||
.host
|
||||
.config
|
||||
.config
|
||||
build.lock
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2343,7 +2343,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "punchnet"
|
||||
version = "1.2.6"
|
||||
version = "1.2.7"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"arc-swap",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "punchnet"
|
||||
version = "1.2.6"
|
||||
version = "1.2.7"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "punchnet client"
|
||||
|
||||
4
Makefile
4
Makefile
@ -1,3 +1,6 @@
|
||||
SHELL := /bin/bash
|
||||
.SHELLFLAGS := --login -c
|
||||
|
||||
self: libtun-so
|
||||
RUSTFLAGS="-L ." cargo build --release
|
||||
|
||||
@ -7,7 +10,6 @@ linux: libtun-so
|
||||
aarch64: libtun-so-aarch64
|
||||
RUSTFLAGS="-L ." cargo build --release --target aarch64-unknown-linux-gnu
|
||||
|
||||
|
||||
linux-tun: libtun-so
|
||||
RUSTFLAGS="-L ." cargo build --features "tun" --release
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user