-
Notifications
You must be signed in to change notification settings - Fork 39
138 lines (114 loc) · 5.36 KB
/
Copy pathrelease.yml
File metadata and controls
138 lines (114 loc) · 5.36 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Release
on:
push:
branches:
- dev
- main
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-release-${{ github.ref_name }}
cancel-in-progress: false
environment:
name: pypi
env:
naas_abi_core_dir: libs/naas-abi-core
naas_abi_marketplace_dir: libs/naas-abi-marketplace
naas_abi_dir: libs/naas-abi
naas_abi_cli_dir: libs/naas-abi-cli
steps:
- name: Setup | Checkout Repository on Release Branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Setup | Force release branch to be at workflow sha
run: |
git reset --hard ${{ github.sha }}
# ------------------------------------------------------------------- #
# Note the use of different IDs to distinguish which submodule was #
# identified to be released. The subsequent actions then reference #
# their specific release ID to determine if a release occurred. #
# ------------------------------------------------------------------- #
- name: Release naas-abi-core
id: release-naas-abi-core
uses: python-semantic-release/python-semantic-release@v10.5.2
with:
directory: ${{ env.naas_abi_core_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
- name: Release naas-abi-marketplace
id: release-naas-abi-marketplace
uses: python-semantic-release/python-semantic-release@v10.5.2
with:
directory: ${{ env.naas_abi_marketplace_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
- name: Release naas-abi
id: release-naas-abi
uses: python-semantic-release/python-semantic-release@v10.5.2
with:
directory: ${{ env.naas_abi_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
- name: Release naas-abi-cli
id: release-naas-abi-cli
uses: python-semantic-release/python-semantic-release@v10.5.2
with:
directory: ${{ env.naas_abi_cli_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
- name: Publish | Upload naas-abi-core to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.5.2
if: steps.release-naas-abi-core.outputs.released == 'true'
with:
directory: ${{ env.naas_abi_core_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
tag: ${{ steps.release-naas-abi-core.outputs.tag }}
- name: Publish | Upload naas-abi-marketplace to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.5.2
if: steps.release-naas-abi-marketplace.outputs.released == 'true'
with:
directory: ${{ env.naas_abi_marketplace_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
tag: ${{ steps.release-naas-abi-marketplace.outputs.tag }}
- name: Publish | Upload naas-abi to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.5.2
if: steps.release-naas-abi.outputs.released == 'true'
with:
directory: ${{ env.naas_abi_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
tag: ${{ steps.release-naas-abi.outputs.tag }}
- name: Publish | Upload naas-abi-cli to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.5.2
if: steps.release-naas-abi-cli.outputs.released == 'true'
with:
directory: ${{ env.naas_abi_cli_dir }}
github_token: ${{ secrets.M_ACCESS_TOKEN }}
tag: ${{ steps.release-naas-abi-cli.outputs.tag }}
# ------------------------------------------------------------------- #
# Python Semantic Release is not responsible for publishing your #
# python artifacts to PyPI. Use the official PyPA publish action #
# instead. The following steps are an example but is not guaranteed #
# to work as the action is not maintained by the #
# python-semantic-release team. #
# ------------------------------------------------------------------- #
- name: Publish | Upload naas-abi-core to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X
if: steps.release-naas-abi-core.outputs.released == 'true'
with:
packages-dir: ${{ format('{0}/dist', env.naas_abi_core_dir) }}
- name: Publish | Upload naas-abi-marketplace to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X
if: steps.release-naas-abi-marketplace.outputs.released == 'true'
with:
packages-dir: ${{ format('{0}/dist', env.naas_abi_marketplace_dir) }}
- name: Publish | Upload naas-abi to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X
if: steps.release-naas-abi.outputs.released == 'true'
with:
packages-dir: ${{ format('{0}/dist', env.naas_abi_dir) }}
- name: Publish | Upload naas-abi-cli to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X
if: steps.release-naas-abi-cli.outputs.released == 'true'
with:
packages-dir: ${{ format('{0}/dist', env.naas_abi_cli_dir) }}