Stage to master #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Stage to master | |
on: | |
workflow_dispatch: | |
jobs: | |
ff-master-to-stage: | |
uses: ./.github/workflows/fast-forward-merge.yml | |
with: | |
ref_to_merge: origin/${{ vars.STAGE_BRANCH_NAME }} | |
base_branch: ${{ vars.MASTER_BRANCH_NAME }} | |
secrets: inherit | |
promote-rc-build-to-release: | |
needs: ff-master-to-stage | |
uses: ./.github/workflows/bump-version.yml | |
with: | |
change: promote-rc-build-to-release | |
ref: ${{ vars.MASTER_BRANCH_NAME }} | |
secrets: inherit | |
build-artifacts: | |
needs: promote-rc-build-to-release | |
uses: ./.github/workflows/build-artifacts.yml | |
with: | |
sha-to-build-and-test: ${{ needs.promote-rc-build-to-release.outputs.bump_sha }} | |
secrets: inherit | |
upload-to-jfrog: | |
name: Upload artifacts to JFrog | |
needs: [ | |
build-artifacts, | |
promote-rc-build-to-release | |
] | |
uses: ./.github/workflows/upload-to-jfrog.yml | |
with: | |
version: ${{ needs.promote-rc-build-to-release.outputs.new_version }} | |
secrets: inherit | |
publish-to-pypi: | |
runs-on: ubuntu-22.04 | |
needs: build-artifacts | |
steps: | |
- name: Download and store all artifacts to single folder | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
merge-multiple: true | |
# TODO: fix | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: artifacts/ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
# See reason for deleting artifacts in dev-workflow-p2.yml | |
delete-artifacts: | |
needs: [ | |
upload-to-jfrog, | |
publish-to-pypi | |
] | |
uses: ./.github/workflows/delete-artifacts.yml | |
fast-forward-stage-to-master: | |
needs: build-artifacts | |
uses: ./.github/workflows/fast-forward-merge.yml | |
with: | |
ref_to_merge: origin/${{ vars.MASTER_BRANCH_NAME }} | |
base_branch: ${{ vars.STAGE_BRANCH_NAME }} | |
secrets: inherit | |
fast-forward-dev-to-master: | |
needs: build-artifacts | |
uses: ./.github/workflows/fast-forward-merge.yml | |
with: | |
ref_to_merge: origin/${{ vars.MASTER_BRANCH_NAME }} | |
base_branch: ${{ vars.DEV_BRANCH_NAME }} | |
secrets: inherit |