From 6407e258b5d92ea7ee6806b2c6afb85106743401 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Sun, 23 Jul 2023 09:19:39 -0700 Subject: [PATCH] Update publish_package.yml (#180) --- .github/workflows/publish_package.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index 501611bdf..a83ce7b6c 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -20,9 +20,25 @@ jobs: run: | curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.poetry/bin" >> $GITHUB_PATH + - name: Build project for distribution + run: poetry build - name: Install dependencies run: poetry install + - name: Check Version + id: check-version + run: | + echo version=$(poetry version --short) >> $GITHUB_OUTPUT + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + artifacts: "dist/*" + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + generateReleaseNotes: true + tag: v${{ steps.check-version.outputs.version }} + commit: master - name: Build and publish - run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} + run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}