Skip to content

Commit

Permalink
Split github action versions (#2517)
Browse files Browse the repository at this point in the history
* Split bump/deploy github actions

* Rename bump action

* Update to require specific tag

---------

Co-authored-by: Paul V Craven <[email protected]>
  • Loading branch information
pvcraven and Paul V Craven authored Jan 24, 2025
1 parent c77ab1a commit 2e6fc57
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Bump Version

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 }}
25 changes: 6 additions & 19 deletions .github/workflows/push_build_to_prod_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,25 @@ name: Distribute build to PyPi Production

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to deploy'
required: true
type: string

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
with:
fetch-tags: 'true'
ref: ${{ github.event.inputs.tag }}
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit 2e6fc57

Please sign in to comment.