diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53da960..8b972bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,16 +3,22 @@ name: Ubuntu build on: push: branches: - - 'main' + - main + tags: + - v*.*.* pull_request: branches: - - 'main' + - main - '*/*' - 'update_flake_lock_action' schedule: - cron: '0 0 * * 1' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: strategy: @@ -45,4 +51,20 @@ jobs: - name: Lint run: | - RUSTFLAGS="${{ matrix.flags }}" cargo clippy --workspace --all-targets --bins --tests --examples --features="logging-utils" -- -D warnings \ No newline at end of file + RUSTFLAGS="${{ matrix.flags }}" cargo clippy --workspace --all-targets --bins --tests --examples --features="logging-utils" -- -D warnings + + publish: + needs: + - build + runs-on: ubuntu-latest + env: + RUST_LOG: info + RUSTFLAGS: "--cfg async_executor_impl=\"async-std\" --cfg async_channel_impl=\"async-std\"" + steps: + - uses: actions/checkout@v4 + - uses: katyo/publish-crates@v2 + with: + # Only do an actual publish if this is a push to a release tag. Otherwise, do a dry run. + dry-run: ${{ !(github.event_name == 'push' && github.ref_type == 'tag') }} + ignore-unpublished-changes: true + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 8bb44b0..a79e314 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,7 +122,7 @@ dependencies = [ [[package]] name = "async-compatibility-layer" -version = "1.0.0" +version = "1.1.0" dependencies = [ "async-lock 3.3.0", "async-std", diff --git a/Cargo.toml b/Cargo.toml index ad666af..1a8a2f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "async-compatibility-layer" description = "an abstraction layer for using both async-std and tokio" -version = "1.0.0" +version = "1.1.0" edition = "2021" [features]