From 2e2d42faec5b8392e3e6a59889202b4e173087cb Mon Sep 17 00:00:00 2001 From: WarriorsSami Date: Sat, 21 Sep 2024 14:48:41 +0300 Subject: [PATCH] feat(ci-cd): add release please pipeline and config --- .github/workflows/anubis-eval-ci.yaml | 4 +-- .github/workflows/dapr-config-ci.yaml | 4 +-- .github/workflows/enki-problems-ci.yaml | 4 +-- .github/workflows/eval-lb-ci.yaml | 4 +-- .github/workflows/hermes-tests-ci.yaml | 4 +-- .github/workflows/odin-gateway-ci.yaml | 4 +-- .github/workflows/quetzalcoatl-auth-ci.yaml | 4 +-- .github/workflows/release-please.yaml | 20 +++++++++++ .release-please-manifest.json | 9 +++++ release-please-config.json | 37 +++++++++++++++++++++ 10 files changed, 80 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/release-please.yaml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/anubis-eval-ci.yaml b/.github/workflows/anubis-eval-ci.yaml index c5ec8eb..47abe93 100644 --- a/.github/workflows/anubis-eval-ci.yaml +++ b/.github/workflows/anubis-eval-ci.yaml @@ -46,14 +46,14 @@ jobs: - name: Test run: cargo nextest run --all-features --profile ci - deploy_to_ghcr: + deploy-to-ghcr: needs: build uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: needs: build uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: diff --git a/.github/workflows/dapr-config-ci.yaml b/.github/workflows/dapr-config-ci.yaml index d656457..a407702 100644 --- a/.github/workflows/dapr-config-ci.yaml +++ b/.github/workflows/dapr-config-ci.yaml @@ -12,13 +12,13 @@ env: BUILD_CONTEXT: dapr jobs: - deploy_to_ghcr: + deploy-to-ghcr: uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: namespace: ${{ env.NAMESPACE }} diff --git a/.github/workflows/enki-problems-ci.yaml b/.github/workflows/enki-problems-ci.yaml index 7d5d0ed..c6d40fc 100644 --- a/.github/workflows/enki-problems-ci.yaml +++ b/.github/workflows/enki-problems-ci.yaml @@ -33,14 +33,14 @@ jobs: - name: Test run: dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false - deploy_to_ghcr: + deploy-to-ghcr: needs: build uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: needs: build uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: diff --git a/.github/workflows/eval-lb-ci.yaml b/.github/workflows/eval-lb-ci.yaml index 1d184d0..82044d3 100644 --- a/.github/workflows/eval-lb-ci.yaml +++ b/.github/workflows/eval-lb-ci.yaml @@ -12,13 +12,13 @@ env: BUILD_CONTEXT: anubis-eval/eval-lb jobs: - deploy_to_ghcr: + deploy-to-ghcr: uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: namespace: ${{ env.NAMESPACE }} diff --git a/.github/workflows/hermes-tests-ci.yaml b/.github/workflows/hermes-tests-ci.yaml index 2ae8c98..c4a59aa 100644 --- a/.github/workflows/hermes-tests-ci.yaml +++ b/.github/workflows/hermes-tests-ci.yaml @@ -39,14 +39,14 @@ jobs: - name: Test run: dart test - deploy_to_ghcr: + deploy-to-ghcr: needs: build uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: needs: build uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: diff --git a/.github/workflows/odin-gateway-ci.yaml b/.github/workflows/odin-gateway-ci.yaml index 91d4c8b..b5e5484 100644 --- a/.github/workflows/odin-gateway-ci.yaml +++ b/.github/workflows/odin-gateway-ci.yaml @@ -12,13 +12,13 @@ env: BUILD_CONTEXT: odin-gateway jobs: - deploy_to_ghcr: + deploy-to-ghcr: uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: namespace: ${{ env.NAMESPACE }} diff --git a/.github/workflows/quetzalcoatl-auth-ci.yaml b/.github/workflows/quetzalcoatl-auth-ci.yaml index 8ed5d1a..aba5d5d 100644 --- a/.github/workflows/quetzalcoatl-auth-ci.yaml +++ b/.github/workflows/quetzalcoatl-auth-ci.yaml @@ -33,14 +33,14 @@ jobs: # - name: Test # run: dotnet test -e ASPNETCORE_ENVIRONMENT=Testing "Tests.Integration/Tests.Integration.csproj" - deploy_to_ghcr: + deploy-to-ghcr: needs: build uses: ./.github/workflows/step-deploy-to-ghcr.yaml with: image_name: ${{ env.IMAGE_NAME }} build_context: ${{ env.BUILD_CONTEXT }} - deploy_to_docker_hub: + deploy-to-docker-hub: needs: build uses: ./.github/workflows/step-deploy-to-docker-hub.yaml with: diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 0000000..2dc79d9 --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -0,0 +1,20 @@ +name: Release Please + +on: + push: + branches: + - develop + +permissions: + contents: read + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..65251c0 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,9 @@ +{ + "quetzalcoatl": "2.0.0", + "enki": "2.0.0", + "hermes": "2.0.0", + "anubis": "2.0.0", + "odin": "2.0.0", + "dapr": "2.0.0", + "eval-lb": "2.0.0" +} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..2b23780 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,37 @@ +{ + "include-component-in-tag": true, + "include-v-in-tag": true, + "tag-separator": "@", + "separate-pull-requests": true, + "packages": { + "quetzalcoatl": { + "path": "quetzalcoatl-auth", + "release-type": "simple" + }, + "enki": { + "path": "enki-problems", + "release-type": "simple" + }, + "hermes": { + "path": "hermes-tests", + "release-type": "dart" + }, + "anubis": { + "path": "anubis-eval", + "release-type": "rust" + }, + "odin": { + "path": "odin-gateway", + "release-type": "simple" + }, + "dapr": { + "path": "dapr", + "release-type": "simple" + }, + "eval-lb": { + "path": "anubis-eval/eval-lb", + "release-type": "simple" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +} \ No newline at end of file