-
Notifications
You must be signed in to change notification settings - Fork 111
78 lines (69 loc) · 2.11 KB
/
stage-to-master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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