From 258fd36ac4892fc4df131dde66eb2d1ac089e127 Mon Sep 17 00:00:00 2001 From: Merzlikin-Matvey Date: Sun, 22 Sep 2024 10:51:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D0=BB=20wo?= =?UTF-8?q?rkflow=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=80=D0=B5=D0=BB=D0=B8=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4768f4..76974db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,8 +43,14 @@ jobs: echo "NEW_VERSION=false" >> $GITHUB_ENV fi + - name: Build package + if: env.NEW_VERSION == 'true' + run: | + poetry build + - name: Create new release if: env.NEW_VERSION == 'true' + id: create_release uses: actions/create-release@v1 with: tag_name: ${{ env.VERSION }} @@ -53,5 +59,16 @@ jobs: New release ${{ env.VERSION }} draft: false prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + + - name: Upload release asset + if: env.NEW_VERSION == 'true' + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist/your-package-name-${{ env.VERSION }}.tar.gz + asset_name: your-package-name-${{ env.VERSION }}.tar.gz + asset_content_type: application/gzip env: GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} \ No newline at end of file