From 8fcce99cc66d6bb8a11e48544bce7612a53d0a11 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 30 Jul 2024 11:47:54 +0100 Subject: [PATCH] fix: Use gh cli to create release --- .github/workflows/compile.yml | 25 ++++++------------------- .github/workflows/tag.yml | 2 +- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 0d6676c..582154b 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -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 }}" diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 840da5c..3d37f98 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -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