Release 0.2.0 #4
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 a new version | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
paths: | |
- "src/web_watchr/__init__.py" | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
id-token: write | |
contents: write | |
if: github.event.pull_request.merged == true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Extract version | |
id: extract_version | |
run: | | |
echo "::set-output name=version::$(grep -oP '__version__ = "\K[^"]+' src/web_watchr/__init__.py)" | |
shell: bash | |
- name: Build and publish | |
run: | | |
make setup-ci | |
make build | |
make publish | |
shell: bash | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
- name: Create release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: v${{ steps.extract_version.outputs.version }} | |
release_name: v${{ steps.extract_version.outputs.version }} | |
draft: false | |
prerelease: false |