From 01f710683a7ff6c163fe990700666af047bf9473 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 4 Nov 2021 22:13:20 -0400 Subject: [PATCH] github-actions/release: rest API methods were moved to github.rest.* github-script@v5 made the change and the release scripts were not tested. Signed-off-by: Jan Vesely --- .github/workflows/prepare-release.yml | 4 ++-- .github/workflows/test-release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 417d501401a..d179f9105e7 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -32,7 +32,7 @@ jobs: console.log('running on:' + context.ref); console.log('Looking for release for tag:' + tag); try { - release_if_exists = await github.repos.getReleaseByTag({ + release_if_exists = await github.rest.repos.getReleaseByTag({ owner: context.repo.owner, repo: context.repo.repo, tag: tag @@ -61,7 +61,7 @@ jobs: } tag = context.ref.split('/').pop() - return await github.repos.createRelease({ + return await github.rest.repos.createRelease({ owner: context.repo.owner, repo: context.repo.repo, tag_name: tag, diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index ef4a18b0c5b..bf09683d64c 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -213,7 +213,7 @@ jobs: const headers = { 'content-type': 'application/zip', 'content-length': file_size(file_path) }; // Upload a release asset - const uploadAssetResponse = await github.repos.uploadReleaseAsset({ + const uploadAssetResponse = await github.rest.repos.uploadReleaseAsset({ url: '${{ github.event.release.upload_url }}', headers, name: asset, @@ -222,7 +222,7 @@ jobs: } // Bump to full release - const uploadAssetResponse = await github.repos.updateRelease({ + const uploadAssetResponse = await github.rest.repos.updateRelease({ owner: context.repo.owner, repo: context.repo.repo, release_id: ${{ github.event.release.id }},