From 819aaf5d0c8e41bd500acee6c5f157a2a97cc77b Mon Sep 17 00:00:00 2001 From: Paul V Craven Date: Fri, 24 Jan 2025 14:46:51 -0600 Subject: [PATCH 1/3] Split bump/deploy github actions --- .github/workflows/bump_version.yml | 24 +++++++++++++++++++ .github/workflows/push_build_to_prod_pypi.yml | 19 --------------- 2 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/bump_version.yml diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml new file mode 100644 index 000000000..4254170c8 --- /dev/null +++ b/.github/workflows/bump_version.yml @@ -0,0 +1,24 @@ +name: Distribute build to PyPi Production + +on: + workflow_dispatch: + +jobs: + # --- Bump version + bump-version: + + runs-on: ubuntu-latest + environment: deploy-pypi-test + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.MY_TOKEN }} + - name: Bump versions + uses: remorses/bump-version@js + with: + version_file: ./arcade/VERSION + prerelease_tag: rc + env: + GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} diff --git a/.github/workflows/push_build_to_prod_pypi.yml b/.github/workflows/push_build_to_prod_pypi.yml index 1385b7b7f..e547b6f1d 100644 --- a/.github/workflows/push_build_to_prod_pypi.yml +++ b/.github/workflows/push_build_to_prod_pypi.yml @@ -4,31 +4,12 @@ on: workflow_dispatch: jobs: - # --- Bump version - bump-version: - - runs-on: ubuntu-latest - environment: deploy-pypi-test - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - token: ${{ secrets.MY_TOKEN }} - - name: Bump versions - uses: remorses/bump-version@js - with: - version_file: ./arcade/VERSION - prerelease_tag: rc - env: - GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} # --- Deploy to pypi deploy-to-pypi-prod: runs-on: ubuntu-latest environment: deploy-pypi-prod - needs: bump-version steps: - name: Checkout uses: actions/checkout@v4 From f48052b4c500e048d0b907564a5a4d3800dff5d0 Mon Sep 17 00:00:00 2001 From: Paul V Craven Date: Fri, 24 Jan 2025 14:50:57 -0600 Subject: [PATCH 2/3] Rename bump action --- .github/workflows/bump_version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 4254170c8..2ee5f1837 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -1,4 +1,4 @@ -name: Distribute build to PyPi Production +name: Bump Version on: workflow_dispatch: From c4313535649b72a98e3caba552fbc31da68e3b00 Mon Sep 17 00:00:00 2001 From: Paul V Craven Date: Fri, 24 Jan 2025 14:56:10 -0600 Subject: [PATCH 3/3] Update to require specific tag --- .github/workflows/push_build_to_prod_pypi.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/push_build_to_prod_pypi.yml b/.github/workflows/push_build_to_prod_pypi.yml index e547b6f1d..7091b7d87 100644 --- a/.github/workflows/push_build_to_prod_pypi.yml +++ b/.github/workflows/push_build_to_prod_pypi.yml @@ -2,6 +2,11 @@ name: Distribute build to PyPi Production on: workflow_dispatch: + inputs: + tag: + description: 'Tag to deploy' + required: true + type: string jobs: @@ -15,6 +20,7 @@ jobs: uses: actions/checkout@v4 with: fetch-tags: 'true' + ref: ${{ github.event.inputs.tag }} - name: Set up Python uses: actions/setup-python@v5 with: