Skip to content

Commit

Permalink
use deploy-gist action
Browse files Browse the repository at this point in the history
  • Loading branch information
acocalypso committed Apr 8, 2024
1 parent e8f38a4 commit 71c759d
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,11 @@ jobs:
- name: Update Gist
if: matrix.platform == 'ubuntu-20.04'
run: |
# Extract content of updater.json
UPDATER_JSON_CONTENT=$(cat update.json)
# Get Gist ID from secrets
GIST_ID="${{ secrets.GIST_ID }}"
# Make a PATCH request to update the gist
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/gists/$GIST_ID \
-d "{\"files\":{\"update.json\":{\"content\":\"$UPDATER_JSON_CONTENT\"}}}"
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
gist_id: ${{ secrets.GIST_ID }}
file_path: update.json
file_type: text
gist_description: "Updater JSON for the latest release"
gist_file_name: "update.json"

0 comments on commit 71c759d

Please sign in to comment.