Skip to content

v1.4.2-alpha.1

v1.4.2-alpha.1 #25

Workflow file for this run

# 相当于脚本用途的一个声明
name: Release-Python
# 触发脚本的事件 这里为发布release之后触发
on:
release:
types: [ published ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Build and publish Python package
run: |
pip install grpcio-tools
python source/python/build.py
cd source/python/
sed -i "s/#VERSION#/${VERSION}/g" src/polarismesh_specification/__about__.py
cat src/polarismesh_specification/__about__.py
pip install --upgrade hatch
hatch build
hatch publish --no-prompt
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.HATCH_INDEX_AUTH }}
VERSION: ${{ steps.get_version.outputs.VERSION }}