diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f420af2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Rust + +on: + push: + branches: + - main + tags: + - 'v*.*.*' # Trigger this workflow for tags like v1.0.0 + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_release: + runs-on: windows-latest # Use a Windows runner + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-pc-windows-msvc # Target for Windows + + - name: Build + run: cargo build --release + + - name: Upload to GitHub Releases + if: startsWith(github.ref, 'refs/tags/') # Only upload on tagged commits + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} # Provided by GitHub + asset_path: ./target/x86_64-pc-windows-msvc/release/your_binary.exe # Replace with your binary name + asset_name: your_binary.exe # Replace with your binary name + asset_content_type: application/octet-stream diff --git a/Cargo.lock b/Cargo.lock index c895d25..fefb8c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,7 +168,7 @@ dependencies = [ [[package]] name = "arcanaeum" -version = "0.2.1" +version = "0.2.2" dependencies = [ "dirs 5.0.0", "eframe", diff --git a/Cargo.toml b/Cargo.toml index 2357425..6749909 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "arcanaeum" -version = "0.2.1" +version = "0.2.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html