ci: update coverage to support py 3.11 #39
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: Semver, Build, Publish | |
on: | |
push: | |
branches: [main, alpha, beta] | |
jobs: | |
semver: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Semantic Release - prepare | |
run: | | |
cat <<EOF > package.json | |
{ | |
"name": "semver", | |
"private": true | |
} | |
EOF | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
semantic_version: 16 | |
branches: | | |
[ | |
'main', | |
{ | |
name: 'alpha', | |
prerelease: true | |
}, | |
{ | |
name: 'beta', | |
prerelease: true | |
} | |
] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
id: semantic | |
outputs: | |
version: ${{ steps.semantic.outputs.new_release_version }} | |
new_release_published: ${{ steps.semantic.outputs.new_release_published }} | |
new_release_channel: ${{ steps.semantic.outputs.new_release_channel }} | |
build_and_publish: | |
runs-on: ubuntu-latest | |
needs: [semver] | |
if: needs.semver.outputs.new_release_published == 'true' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: install poetry | |
uses: abatilo/[email protected] | |
- name: Build | |
run: | | |
poetry version ${{ needs.semver.outputs.version }} | |
poetry build | |
- name: Publish distribution 📦 to PyPI | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
poetry publish |