Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a609c1af95 | |||
| 3d32be8a83 | |||
| c4c71dc892 | |||
| 4e625afaba | |||
| 9578f991f4 | |||
| 1cd7916e06 |
@@ -8,13 +8,17 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
|
||||
@@ -8,13 +8,19 @@ on:
|
||||
jobs:
|
||||
build-linux-static:
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust + musl target
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
sudo apt-get update -qq && sudo apt-get install -y -qq musl-tools jq
|
||||
$HOME/.cargo/bin/rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -25,11 +31,6 @@ jobs:
|
||||
key: linux-musl-cargo-${{ hashFiles('src/Cargo.lock') }}
|
||||
restore-keys: linux-musl-cargo-
|
||||
|
||||
- name: Install musl toolchain
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y -qq musl-tools
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
- name: Build static binary
|
||||
run: cargo build --release --target x86_64-unknown-linux-musl
|
||||
|
||||
@@ -39,9 +40,17 @@ jobs:
|
||||
cp target/x86_64-unknown-linux-musl/release/obikmer /tmp/dist/obikmer-linux-x86_64
|
||||
strip /tmp/dist/obikmer-linux-x86_64
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: obikmer-linux-x86_64
|
||||
path: /tmp/dist/obikmer-linux-x86_64
|
||||
if-no-files-found: error
|
||||
- name: Create Gitea release and upload binary
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
release_id=$(curl -s -X POST \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\"}" | jq -r '.id')
|
||||
curl -s -X POST \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$release_id/assets" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-F "attachment=@/tmp/dist/obikmer-linux-x86_64"
|
||||
|
||||
Generated
+1
-1
@@ -1704,7 +1704,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "obikmer"
|
||||
version = "0.1.1"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"csv",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "obikmer"
|
||||
version = "0.1.1"
|
||||
version = "0.1.4"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
|
||||
Reference in New Issue
Block a user