diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b8ae49..f1a36e8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,13 +2,32 @@ name: Publish to PyPI on: push: tags: - - "v*.*.*" + - "*.*.*" jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build and publish to pypi + - name: Checkout Code Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Build and Publish to PyPI uses: JRubics/poetry-publish@v2.0 with: - pypi_token: ${{ secrets.PIPY_API_TOKEN }} \ No newline at end of file + pypi_token: ${{ secrets.PIPY_API_TOKEN }} + + - 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: ${{ github.ref }} + body: | + This is a release for the version ${{ github.ref }}. + PyPI package: https://pypi.org/project/${{ github.repository }}/${{ github.ref }} \ No newline at end of file