From acf7238115929422a4c83d35ef3e9aa2d2c6275e Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Wed, 18 Dec 2024 10:10:17 -0600 Subject: [PATCH] add pre-release into actual release --- .github/workflows/pre_release.yml | 12 ++++++++++-- .github/workflows/release.yml | 16 +++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre_release.yml b/.github/workflows/pre_release.yml index 138ae075..8a48c8ec 100644 --- a/.github/workflows/pre_release.yml +++ b/.github/workflows/pre_release.yml @@ -29,14 +29,22 @@ name: Version Bump and Changelog Generation run-name: "${{ inputs.version_number }} - Version Bump and Changelog Generation" on: + workflow_call: + inputs: + version_number: + description: "Version to bump to: ex. 1.14.5" + required: true + type: string workflow_dispatch: inputs: version_number: + description: "Version to bump to: ex. 1.14.5" required: true type: string test_run: + description: "Test run - do not commit changes" required: false - default: true + default: false type: boolean permissions: @@ -374,7 +382,7 @@ jobs: needs: [run-unit-tests, create-temp-branch, audit-version-in-code, audit-changelog] if: | !failure() && !cancelled() && - inputs.test_run == false && + inputs.test_run != true && ( needs.audit-changelog.outputs.exists == 'false' || needs.audit-version-in-code.outputs.up_to_date == 'false' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad581c99..7efb9b5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,13 +3,17 @@ name: Release on: workflow_dispatch: inputs: + version_number: + description: "Version to bump to: ex. 1.14.5" + required: true + type: string deploy-to: type: choice description: Choose where to publish (test/prod) options: - PypiProd - PypiTest - default: PypiTest + default: PypiProd permissions: read-all @@ -23,10 +27,20 @@ concurrency: cancel-in-progress: true jobs: + release-prep: + permissions: + contents: write + name: "Version bump and Changelog update" + uses: ./.github/actions/release-prep + with: + version_number: ${{ inputs.version_number }} + secrets: + inherit release: name: PyPI - ${{ inputs.deploy-to }} runs-on: ubuntu-latest + needs: release-prep environment: name: ${{ inputs.deploy-to }} permissions: