Skip to content

Commit

Permalink
updating ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnnnnnnnnnnnn committed Aug 26, 2024
1 parent 3e3a937 commit 6fc9fae
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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)
});
Expand Down

0 comments on commit 6fc9fae

Please sign in to comment.