From 58f08326fa42ce4b98b7f312cdca228f9f282cf3 Mon Sep 17 00:00:00 2001 From: Haris <4259838+Wulf@users.noreply.github.com> Date: Mon, 4 Sep 2023 16:29:46 -0400 Subject: [PATCH] ci: added release step for main branch Test publishing CI (#75) --- .github/workflows/CI.yml | 29 ++++++++++++++--------------- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0a4de9ea..bd353f83 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,21 +1,8 @@ name: Continuous Integration -on: - workflow_dispatch: - push: - paths: - - ".github/workflows/CI.yml" - - "**.rs" - - "Cargo.lock" - - "Cargo.toml" - pull_request: - paths: - - ".github/workflows/CI.yml" - - "**.rs" - - "Cargo.lock" - - "Cargo.toml" +on: push + env: CARGO_TERM_COLOR: always - CARGO_INCREMENTAL: true concurrency: group: CI-${{ github.ref }} @@ -103,3 +90,15 @@ jobs: toolchain: nightly - run: rustup component add rustfmt - run: cargo fmt --all -- --check + + release: + runs-on: ubuntu-latest + name: release + needs: [build, clippy, test, test-script, fmt] + if: github.ref == 'refs/heads/release' + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index fe509d38..c25e0361 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,7 +143,7 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "dsync" -version = "0.0.16" +version = "0.0.17-alpha" dependencies = [ "Inflector", "clap", diff --git a/Cargo.toml b/Cargo.toml index 5ae00d45..f51f0b47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dsync" description = "Generate rust structs & query functions from diesel schema files." -version = "0.0.16" +version = "0.0.17-alpha" readme = "README.md" repository = "https://github.com/Wulf/dsync" license = "MIT OR Apache-2.0"