Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sokach-dev committed Dec 4, 2024
0 parents commit af5d868
Show file tree
Hide file tree
Showing 23 changed files with 4,597 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
permissions: write-all
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- release_for: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin: angel
name: angel-linux-amd64

- release_for: macOS-x86_64
os: macos-latest
target: x86_64-apple-darwin
bin: angel
name: angel-macos-amd64

- release_for: macOS-aarch64
os: macos-latest
target: aarch64-apple-darwin
bin: angel
name: angel-macos-arm64

steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}

- name: Build
run: |
cargo install sqlx-cli --no-default-features --features sqlite
export DATABASE_URL=sqlite:./db.sqlite
sqlx database create
sqlx migrate run
cargo build --release --bin angel --target ${{ matrix.platform.target }}
- name: Prepare assets
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
mv ${{ matrix.platform.bin }} ${{ matrix.platform.name }}
- name: Upload binaries to release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
target/${{ matrix.platform.target }}/release/${{ matrix.platform.name }}
draft: false
prerelease: false
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target
app.toml
.env
data
Loading

0 comments on commit af5d868

Please sign in to comment.