diff --git a/.github/workflows/pre_release.yml b/.github/workflows/pre_release.yml index 138ae07..8a48c8e 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 ad581c9..7efb9b5 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: