Skip to content

Commit

Permalink
Update release workflow to read version from pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
derkweijers committed Feb 29, 2024
1 parent 12c965a commit 70158b2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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 }}

0 comments on commit 70158b2

Please sign in to comment.