-
Notifications
You must be signed in to change notification settings - Fork 176
72 lines (63 loc) · 2.4 KB
/
release-sync.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
name: RELEASE-SYNC
on:
workflow_dispatch:
release:
types: [ released, prereleased ]
env:
CLI_REPO: 'apecloud/kbcli'
GITLAB_KBCLI_PROJECT_ID: 85948
GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
jobs:
update-release-kbcli:
name: Update Release kbcli
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.get_latest_version.outputs.release_version }}
steps:
- uses: actions/checkout@v3
- name: update release ${{ env.CLI_NAME }} latest
id: get_latest_version
run: |
LATEST_RELEASE_TAG=`bash ${{ github.workspace }}/.github/utils/utils.sh \
--type 4 \
--github-token ${{ secrets.PERSONAL_ACCESS_TOKEN }}`
bash ${{ github.workspace }}/.github/utils/utils.sh \
--type 5 \
--tag-name $LATEST_RELEASE_TAG \
--github-repo ${{ env.CLI_REPO }} \
--github-token ${{ secrets.PERSONAL_ACCESS_TOKEN }}
bash ${{ github.workspace }}/.github/utils/release_gitlab.sh \
--type 4 \
--tag-name $LATEST_RELEASE_TAG \
--project-id ${{ env.GITLAB_KBCLI_PROJECT_ID }} \
--access-token ${{ env.GITLAB_ACCESS_TOKEN }}
echo release_version=$LATEST_RELEASE_TAG >> $GITHUB_OUTPUT
release-homebrew-tap:
needs: update-release-kbcli
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/homebrew-tap"
WORKFLOW_ID: "release.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit
release-winget-kbcli:
needs: update-release-kbcli
if: github.event.action== 'released'
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/apecloud-cd"
WORKFLOW_ID: "publish-kbcli-winget.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit
release-scoop-kbcli:
needs: update-release-kbcli
if: github.event.action== 'released'
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/apecloud-cd"
WORKFLOW_ID: "publish-kbcli-scoop.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit