From cc8cf4ba55f11cccb1d2af56c83a7747bac40c20 Mon Sep 17 00:00:00 2001 From: Philippe Loctaux Date: Sun, 9 Jul 2023 19:58:06 +0200 Subject: [PATCH] ci: build musl binary, archive assets ci: using new docker image ci: skip the tar ci: treat folders as folders ci: bring back the tar ci: paths ci: new paths ci: name the artifact --- .gitea/workflows/binary.yml | 37 +++++++++++++++++++++++++++++++++++++ crates/ezidam/ezidam.toml | 4 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/binary.yml diff --git a/.gitea/workflows/binary.yml b/.gitea/workflows/binary.yml new file mode 100644 index 0000000..aa11a83 --- /dev/null +++ b/.gitea/workflows/binary.yml @@ -0,0 +1,37 @@ +name: Binary +on: + push: + branches: + - master + +jobs: + binary-archive: + runs-on: node-16-bullseye + container: + image: muslrust:stable-philt3r + steps: + - name: Get code + uses: actions/checkout@v3 + + # rust + - name: Rust toolchain + uses: https://github.com/dtolnay/rust-toolchain@stable + with: + targets: x86_64-unknown-linux-musl + - run: cargo build --target x86_64-unknown-linux-musl --release + + # archive + - name: Create archive + run: > + tar -cvf /tmp/ezidam.tar + -C ./crates/ezidam ezidam.toml + -C ./ static/ + -C ./ templates/ + -C ../../target/x86_64-unknown-linux-musl/release ezidam + + # upload + - uses: actions/upload-artifact@v3 + with: + name: ezidam.tar + path: /tmp/ezidam.tar + diff --git a/crates/ezidam/ezidam.toml b/crates/ezidam/ezidam.toml index 82a0d24..e0d79cc 100644 --- a/crates/ezidam/ezidam.toml +++ b/crates/ezidam/ezidam.toml @@ -6,8 +6,10 @@ static_dir = "./static" [default.databases.ezidam] url = "../../database/ezidam.sqlite" +# remove this section to disable sending email [default.email] from = "ezidam " transport = "unencrypted" host = "localhost" -port = 1025 \ No newline at end of file +port = 1025 +