diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7c7a01d..e54561c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -75,14 +75,19 @@ jobs: run: python -m build - name: Create GitHub Release id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: actions/github-script@v6 with: - tag_name: v${{ env.VERSION }} - release_name: Release v${{ env.VERSION }} - draft: false - prerelease: false + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const { data: release } = await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: `v${process.env.VERSION}`, + name: `Release v${process.env.VERSION}`, + draft: false, + prerelease: false + }); + core.setOutput('release_id', release.id); - name: Upload to PyPI env: TWINE_USERNAME: __token__ @@ -116,7 +121,7 @@ jobs: await github.rest.repos.uploadReleaseAsset({ owner: context.repo.owner, repo: context.repo.repo, - release_id: ${{ steps.create_release.outputs.id }}, + release_id: ${{ steps.create_release.outputs.release_id }}, name: file, data: await fs.readFile(filePath) });