From 01b80407cbdf71a4bef70befb1fe939af6511ad0 Mon Sep 17 00:00:00 2001 From: Nicolas BRIERE Date: Tue, 27 Aug 2024 09:47:30 +0200 Subject: [PATCH] ci: update release ci to use releaseplease --- .github/workflows/release.yml | 92 ++++------------------------------- 1 file changed, 10 insertions(+), 82 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a4822c..a52fb28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,91 +3,19 @@ name: "Release" on: workflow_dispatch: push: - tags: - - '*' -jobs: - build: - uses: ZeroGachis/.github/.github/workflows/build-image.yml@v3 - with: - image_name: magicparse - dockerfile_context: . - environment_name: main - vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} - regitry_url: ghcr.io - secrets: inherit + branches: + - main - static-metrics: - needs: - [ - build, - ] - uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v3 - with: - image_url: ${{ needs.build.outputs.image-url }} - workdir: /home/src/magicparse - environment_name: main - vault_enabled: false - tailscale_enabled: false - run_command: | - black magicparse/ --check --diff - flake8 - secrets: inherit - - unit-tests: - needs: - [ - build, - ] - uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v3 +jobs: + github-release: + uses: ZeroGachis/.github/.github/workflows/gh-release-please.yml@v4 with: - image_url: ${{ needs.build.outputs.image-url }} - workdir: /home/src/magicparse - run_command: | - pytest --verbose --junit-xml reports/unit_tests_results.xml - environment_name: main - vault_enabled: false - tailscale_enabled: false - enable_test_report: true - test_report_name: "UT Report" - test_report_path: reports/unit_tests_results.xml - test_report_format: java-junit - secrets: inherit - + major_and_minor_tags: false publish: - needs: - [ - build, - unit-tests, - static-metrics, - ] - uses: ZeroGachis/.github/.github/workflows/python-publish.yml@v3 + needs: github-release + if: ${{ needs.github-release.outputs.release_created == 'true' }} + uses: ZeroGachis/.github/.github/workflows/python-publish.yml@v4 with: python_version: "3.10" environment_name: main - - github-release: - needs: [ - build, - static-metrics, - unit-tests, - publish, - ] - uses: ZeroGachis/.github/.github/workflows/gh-release-notes.yml@v3 - - detroy: - if: always() - needs: - [ - build, - unit-tests, - static-metrics, - publish, - github-release, - ] - uses: ZeroGachis/.github/.github/workflows/delete-docker-image.yml@v3 - with: - image_name: magicparse - image_version: ${{ needs.build.outputs.image-version }} - environment_name: main - vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }} - secrets: inherit + \ No newline at end of file