fix(api): Put Zone Order (#200) #88
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: Release Management | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Semantic Release Config | |
run: | | |
echo '{ | |
"tagFormat":"${version}", | |
"plugins": [ | |
"@semantic-release/commit-analyzer", | |
"@semantic-release/release-notes-generator", | |
"@semantic-release/changelog", | |
"@semantic-release/github" | |
] | |
} | |
'> .releaserc | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v2 | |
id: semantic | |
with: | |
branches: 'master' | |
semantic_version: 19.0.2 | |
extra_plugins: | | |
@semantic-release/commit-analyzer@9.0.2 | |
@semantic-release/release-notes-generator@10.0.3 | |
@semantic-release/changelog@6.0.1 | |
@semantic-release/github@8.0.2 | |
dry_run: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: set release_version | |
id: set_release_version | |
uses: noobly314/share-data@v1 | |
with: | |
share-id: release_version | |
mode: set | |
key: version | |
value: ${{ steps.semantic.outputs.new_release_version }} | |
- name: set release_published | |
id: set_release_published | |
uses: noobly314/share-data@v1 | |
with: | |
share-id: release_published | |
mode: set | |
key: version | |
value: ${{ steps.semantic.outputs.new_release_published }} | |
deploy: | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.7' | |
- name: get release_version | |
id: release_version | |
uses: noobly314/share-data@v1 | |
with: | |
share-id: release_version | |
mode: get | |
key: version | |
- name: get release_published | |
id: release_published | |
uses: noobly314/share-data@v1 | |
with: | |
share-id: release_published | |
mode: get | |
key: version | |
- name: Update package version | |
run: | | |
sed -i "s/^\( *version=\).*/\1'${{ steps.release_version.outputs.data }}',/g" setup.py | |
sed -i 's/^\(^version = \).*/\1"${{ steps.release_version.outputs.data }}",/g' pyproject.toml | |
if: steps.release_published.outputs.data == 'true' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
if: steps.release_published.outputs.data == 'true' | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload dist/* | |
if: steps.release_published.outputs.data == 'true' |