From d2439e3a66491980501e112935c888b6bf01bff3 Mon Sep 17 00:00:00 2001 From: AlexsJones Date: Mon, 6 Jan 2025 09:27:40 +0000 Subject: [PATCH] first: attempt at adding build/release step Signed-off-by: AlexsJones --- .github/workflows/release.yaml | 39 ++++++++++++++++++++++++++++++++++ src/main.rs | 5 +---- 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c1da671 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,39 @@ +name: release +on: + push: + branches: + - main + - '[0-9]+.[0-9]+.x' + workflow_dispatch: +env: + REGISTRY: ghcr.io + GITHUB_PAGES_BRANCH: gh_pages + +defaults: + run: + shell: bash + +jobs: + release: + name: release ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: [stable-x86_64-unknown-linux-gnu] + steps: + - uses: actions/checkout@master + - name: Compile and release + uses: rust-build/rust-build.action@v1.4.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + RUSTTARGET: ${{ matrix.target }} + EXTRA_FILES: "README.md LICENSE" + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: Binary + path: | + ${{ steps.compile.outputs.BUILT_ARCHIVE }} + ${{ steps.compile.outputs.BUILT_CHECKSUM }} diff --git a/src/main.rs b/src/main.rs index a7937cf..0b90fb6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,8 +41,7 @@ fn main() { std::thread::spawn(move || { rt.block_on(async { loop { - - tokio::time::sleep(Duration::from_secs(30)).await; + tokio::time::sleep(Duration::from_secs(3000)).await; } }) }); @@ -90,7 +89,6 @@ impl Default for MyApp { impl MyApp { fn new(cc: &eframe::CreationContext<'_>) -> Self { - let mut app = Self::default(); // Start the background polling for connection status app @@ -109,7 +107,6 @@ impl MyApp { } else { connection_status_tx.send(false).unwrap(); } - tokio::time::sleep(Duration::from_secs(5)).await; } });