Skip to content

Commit

Permalink
fix: Use gh cli to create release
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed Jul 30, 2024
1 parent 8936887 commit 8fcce99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,10 @@ jobs:
name: resume-pdf
path: out/

- name: 🔑 Set up GitHub CLI
run: |
echo "${{ secrets.BOT_TOKEN }}" | gh auth login --with-token
- name: 📄 Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ env.TAG_NAME }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: Release ${{ env.TAG_NAME }}
body: "Generated CV PDF for release ${{ env.TAG_NAME }}"
draft: true
prerelease: false

- name: 📤 Upload PDF to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: out/${{ env.PDF_NAME }}
asset_name: ${{ env.PDF_NAME }}
asset_content_type: application/pdf
run: |
gh release create "${{ github.ref }}" out/${{ env.PDF_NAME }} --title "Release ${{ github.ref }}" --notes "Generated CV PDF for release ${{ github.ref }}"
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: echo $NEW_TAG > new_tag.txt

- name: Upload Tag Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: new_tag
path: new_tag.txt
Expand Down

0 comments on commit 8fcce99

Please sign in to comment.