Skip to content

Merge pull request #9 from 01Joseph-Hwang10/release-please--branches-… #31

Merge pull request #9 from 01Joseph-Hwang10/release-please--branches-…

Merge pull request #9 from 01Joseph-Hwang10/release-please--branches-… #31

Workflow file for this run

on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
name: Release and publish packages
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GH_PAT }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# Check-out the repository
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created == 'true' }}
with:
ref: ${{ github.event.after }}
# Set up Python
- uses: actions/setup-python@v2
if: ${{ steps.release.outputs.release_created == 'true' }}
with:
python-version: 3.11
# Set up Poetry
- uses: snok/install-poetry@v1
if: ${{ steps.release.outputs.release_created == 'true' }}
with:
virtualenvs-create: true
virtualenvs-in-project: true
# Configure basic credentials for PyPI
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_PASSWORD }}"
if: ${{ steps.release.outputs.release_created == 'true' }}
# Build and publish package
- run: poetry build
if: ${{ steps.release.outputs.release_created == 'true' }}
- run: poetry publish
if: ${{ steps.release.outputs.release_created == 'true' }}