Release 0.6.0-rc.2 #5
Workflow file for this run
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 | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0 | |
- name: Set up Python | |
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0 | |
with: | |
python-version: '3.x' | |
- name: Install poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV | |
- name: Build distributions | |
run: | | |
poetry build | |
- name: Upload distribution artifacts | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 | |
with: | |
name: rt-dist | |
path: dist | |
test: | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0 | |
- name: Download distribution artifact | |
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0 | |
with: | |
name: rt-dist | |
path: dist | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Test package | |
run: | | |
PACKAGE_NAME=`(cd dist && ls *whl | cut -f 1 -d "-")` && echo $PACKAGE_NAME | |
pip install --pre --find-links ./dist/ $PACKAGE_NAME | |
cd tests && python run_tests.py | |
release: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0 | |
- name: Get release tag | |
id: tag | |
run: | | |
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Create release | |
run: | | |
gh release create ${{ steps.tag.outputs.tag }} -t ${{ steps.tag.outputs.tag }} -F ./releases/${{ steps.tag.outputs.tag }}.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
needs: [release] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0 | |
- name: Download distribution artifact | |
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0 | |
with: | |
name: rt-dist | |
path: dist | |
- name: Set up Python | |
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0 | |
with: | |
python-version: '3.x' | |
- name: Install poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV | |
- name: Configure pypi credentials | |
env: | |
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
poetry config http-basic.pypi __token__ "$PYPI_API_TOKEN" | |
- name: Publish release to pypi | |
run: | | |
poetry publish |