From 78b838168d1843e7a0bfcce58fd3c9e03d706497 Mon Sep 17 00:00:00 2001 From: Tony Duco Date: Thu, 2 Nov 2023 00:07:32 -0400 Subject: [PATCH 1/3] ci: add prepare release workflow --- .github/workflows/release-please.yml | 22 ++++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..cb458fa --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,22 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: Prepare Release + +jobs: + prepare-release: + runs-on: ubuntu-latest + steps: + - name: Prepare release + uses: google-github-actions/release-please-action@v3 + with: + release-type: rust + package-name: nforwardauth + pull-request-header: Prepared release-type + changelog-types: '[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"doc","section":"Documentation"},{"type":"perf","section":"Performance"},{"type":"refactor","section":"Refactor"},{"type":"test","section":"Testing"},{"type":"chore","section":"Miscellaneous Tasks"},{"type":"ci","section":"CI/CD"}]' diff --git a/Cargo.toml b/Cargo.toml index f283bd3..739c1d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nforwardauth" -version = "1.2.0" +version = "1.2.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 19f75cc36f51370a54689118d15cde7b644a112a Mon Sep 17 00:00:00 2001 From: Tony Duco Date: Thu, 2 Nov 2023 18:29:01 -0400 Subject: [PATCH 2/3] ci: reorganize workflows and make names consistent --- .github/workflows/dev.yml | 27 ------------------- .github/workflows/{ci.yml => main.yml} | 9 ++++--- ...release-please.yml => release-prepare.yml} | 5 ++-- .github/workflows/release.yml | 4 +-- 4 files changed, 10 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/dev.yml rename .github/workflows/{ci.yml => main.yml} (96%) rename .github/workflows/{release-please.yml => release-prepare.yml} (94%) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml deleted file mode 100644 index 3cd3bcb..0000000 --- a/.github/workflows/dev.yml +++ /dev/null @@ -1,27 +0,0 @@ -on: - push: - branches: - - dev - -name: Dev - -jobs: - build-and-release: - name: Build and Release (dev) - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - uses: docker/setup-qemu-action@v2 - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - uses: docker/setup-buildx-action@v2 - - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - pull: true - tags: nosduco/nforwardauth:dev,nosduco/nforwardauth:${{ github.ref_name }} diff --git a/.github/workflows/ci.yml b/.github/workflows/main.yml similarity index 96% rename from .github/workflows/ci.yml rename to .github/workflows/main.yml index fe6ab2d..427dd7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,8 @@ -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: name: CI @@ -16,7 +20,6 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check - fmt: name: Format runs-on: ubuntu-22.04 @@ -32,7 +35,6 @@ jobs: with: command: fmt args: --all -- --check - clippy: name: Clippy runs-on: ubuntu-22.04 @@ -48,7 +50,6 @@ jobs: with: command: clippy args: -- -D warnings - build: name: Build runs-on: ubuntu-22.04 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-prepare.yml similarity index 94% rename from .github/workflows/release-please.yml rename to .github/workflows/release-prepare.yml index cb458fa..2a8f18f 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-prepare.yml @@ -7,10 +7,11 @@ permissions: contents: write pull-requests: write -name: Prepare Release +name: Release jobs: - prepare-release: + prepare: + name: Prepare runs-on: ubuntu-latest steps: - name: Prepare release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab902ce..704557e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,8 @@ on: name: Release jobs: - build-and-release: - name: Build and Release + build-and-publish: + name: Build and Publish runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 From 6f58a4e6ebdac94666d40441102025d74715f5af Mon Sep 17 00:00:00 2001 From: Tony Duco Date: Thu, 2 Nov 2023 18:31:42 -0400 Subject: [PATCH 3/3] ci: configure dependabot to follow conventional commits --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2c7d170..3e6bc61 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,7 @@ updates: directory: "/" schedule: interval: "daily" + commit-message: + prefix: fix + prefix-development: chore + include: scope