From f98fdf8cd6819ba60113a9d716afd322e3da5234 Mon Sep 17 00:00:00 2001 From: Szymon Szyszkowski Date: Wed, 12 Feb 2025 10:34:06 +0000 Subject: [PATCH] feat: remove development release --- .github/workflows/_tag.yaml | 45 ------------------------------ .github/workflows/dev-release.yaml | 17 ----------- .github/workflows/release.yaml | 10 ++++++- 3 files changed, 9 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/_tag.yaml delete mode 100644 .github/workflows/dev-release.yaml diff --git a/.github/workflows/_tag.yaml b/.github/workflows/_tag.yaml deleted file mode 100644 index 6ad31d5..0000000 --- a/.github/workflows/_tag.yaml +++ /dev/null @@ -1,45 +0,0 @@ -on: - workflow_call: - -jobs: - tag: - # NOTE: only trigger the workflow when the commit is not from the GitHubActions bot (prevent self-triggering) - if: github.event.commits[0].author.name != 'github-actions' - runs-on: ubuntu-latest - concurrency: release - environment: DEV - permissions: - contents: write - - steps: - # NOTE: commits using GITHUB_TOKEN does not trigger workflows and we want to trigger PiPY from tag - - uses: actions/create-github-app-token@v1 - id: trigger-token - with: - app-id: ${{ vars.TRIGGER_WORKFLOW_GH_APP_ID}} - private-key: ${{ secrets.TRIGGER_WORKFLOW_GH_APP_KEY }} - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - repository: opentargets/gentroutils - token: ${{ secrets.GITHUB_TOKEN }} - persist-credentials: false - ref: main - - name: Python Semantic Release - id: semrelease - # v9.6.0 is required due to the python v3.12 in the newer version of semantic release action which - # breaks the poetry build command. - uses: python-semantic-release/python-semantic-release@v9.6.0 - with: - github_token: ${{ steps.trigger-token.outputs.token }} - - - name: Publish package to GitHub Release - uses: python-semantic-release/upload-to-gh-release@main - if: ${{ steps.semrelease.outputs.released }} == 'true' - with: - # NOTE: allow to start the workflow when push action on tag gets executed - # requires using GH_APP to authenitcate, otherwise push authorised with - # the GITHUB_TOKEN does not trigger the tag artifact workflow. - # see https://github.com/actions/create-github-app-token - github_token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ steps.semrelease.outputs.tag }} diff --git a/.github/workflows/dev-release.yaml b/.github/workflows/dev-release.yaml deleted file mode 100644 index dca389c..0000000 --- a/.github/workflows/dev-release.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: dev-release -on: - push: - tags: ['v[0-9]+.[0-9]+.[0-9]+-dev*'] - workflow_dispatch: - -concurrency: - group: test - cancel-in-progress: true - -jobs: - dev-release: - name: dev-release - uses: ./.github/workflows/_release.yaml - with: - environment: DEV - url: https://test.pypi.org/p/gentroutils diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0cc1b0f..efeeca9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,8 +9,16 @@ concurrency: cancel-in-progress: true jobs: + release: + name: test-pypi-release + uses: ./.github/workflows/_release.yaml + with: + environment: DEV + url: https://test.pypi.org/p/gentroutils + dev-release: - name: dev-release + needs: release + name: pypi-release uses: ./.github/workflows/_release.yaml with: environment: PyPI