Bump version: 0.3.2 → 0.4.0 #14
Workflow file for this run
This file contains hidden or 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: | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| jobs: | |
| build: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --upgrade setuptools wheel twine build | |
| pip install -r requirements.txt | |
| - name: Build | |
| run: | | |
| python -m build | |
| pip install -e . | |
| - name: Get version number | |
| id: get_version | |
| run: echo "VERSION=$(python3 -c 'import pyrolab; print(pyrolab.__version__)')" >> $GITHUB_ENV | |
| - name: Load Release text | |
| id: get_text | |
| run: | | |
| BODY=$(cat ./docs/changelog/${{ env.VERSION }}-changelog.md) | |
| BODY="${BODY//'%'/'%25'}" | |
| BODY="${BODY//$'\n'/'%0A'}" | |
| BODY="${BODY//$'\r'/'%0D'}" | |
| echo "BODY=$BODY" >> $GITHUB_OUTPUT | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.5.0 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_PASSWORD }} | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: PyroLab ${{ env.VERSION }} | |
| body: ${{ env.BODY }} | |
| draft: false | |
| prerelease: false |