From 94be52e6c716595cb91f20866eba8a5806963f9e Mon Sep 17 00:00:00 2001 From: Javier Coindreau Date: Thu, 30 Nov 2023 19:40:09 -0500 Subject: [PATCH] Add autobuild action --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ Cargo.toml | 2 +- src/main.rs | 11 ++--------- 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7bcc0c1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: automarathon-build +on: + push: + tags: + - 'v*' + +jobs: + publish-archives: + name: Publish archives + strategy: + matrix: + os: [windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - name: Build project + run: cargo build --release + - name: Release-Windows + if: contains(matrix.os, 'windows') + uses: softprops/action-gh-release@v1 + with: + files: | + ./target/release/automarathon.exe + diff --git a/Cargo.toml b/Cargo.toml index df7be79..f315a7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "auto_marathon" +name = "automarathon" version = "0.1.0" edition = "2021" diff --git a/src/main.rs b/src/main.rs index 5b7fad4..fa6ca28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,20 +204,13 @@ async fn read_terminal(tx: UnboundedSender) -> Result<(), Error> #[tokio::main] async fn main() -> Result<(), Error> { - let args = Args { - command: RunType::Run { - save_file: PathBuf::from("save.json"), - layout_file: PathBuf::from("layouts.json"), - settings_file: PathBuf::from("settings.json"), - project_file: PathBuf::from("proj.json"), - }, - }; //Args::parse(); + let args = Args::parse(); env_logger::builder() .filter(Some("tracing::span"), log::LevelFilter::Warn) .filter(Some("serenity"), log::LevelFilter::Warn) .filter(Some("hyper"), log::LevelFilter::Warn) - .filter_level(log::LevelFilter::Debug) + .filter_level(log::LevelFilter::Info) .init(); log::info!("Launching AutoMarathon {} on {}", AUTOMARATHON_VER, consts::OS);