43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Binary
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
binary-archive:
|
|
runs-on: node-16-bullseye
|
|
steps:
|
|
- name: Get code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Musl tools
|
|
run: apt-get update && apt-get install musl musl-dev musl-tools
|
|
|
|
# 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
|
|
|
|
# prepare archive
|
|
- name: Prepare archive contents
|
|
run: |
|
|
mkdir -p /tmp/ezidam
|
|
cp -v ./target/x86_64-unknown-linux-musl/release/ezidam /tmp/ezidam
|
|
cp -v ./crates/ezidam/ezidam.toml /tmp/ezidam
|
|
cp -rv ./crates/ezidam/static /tmp/ezidam/
|
|
cp -rv ./crates/ezidam/templates /tmp/ezidam/
|
|
cp -rv ./crates/email/templates /tmp/ezidam/email-templates
|
|
|
|
# archive
|
|
- name: Create archive
|
|
run: tar -cvf /tmp/ezidam.tar /tmp/ezidam
|
|
|
|
# upload
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ezidam.tar
|
|
path: /tmp/ezidam.tar
|
|
|