diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 34cc194..aee1999 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,12 +3,6 @@ on: pull_request: types: - closed - workflow_dispatch: - inputs: - version: - description: 'Version to release' - required: true - jobs: release: runs-on: ubuntu-latest @@ -29,6 +23,10 @@ jobs: - name: Install Poetry run: pip install poetry + + - name: read the version from pyproject.toml + id: read_version + run: echo VERSION=$(poetry version -s) >> "$GITHUB_OUTPUT" - name: Build and publish run: | @@ -37,6 +35,6 @@ jobs: # poetry publish --build --no-interaction - name: Create a release on GitHub - run: gh release create ${{ inputs.version }} dist/* --title "Release ${{ inputs.version }}" --notes "Release ${{ inputs.version }}" + run: gh release create ${{ steps.read_version.outputs.VERSION }} dist/* --title "Release ${{ steps.read_version.outputs.VERSION }}" --notes "Release ${{ steps.read_version.outputs.VERSION }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}