Skip to content

Commit

Permalink
github-actions/release: rest API methods were moved to github.rest.*
Browse files Browse the repository at this point in the history
github-script@v5 made the change and the release scripts were not
tested.

Signed-off-by: Jan Vesely <[email protected]>
  • Loading branch information
jvesely committed Nov 6, 2021
1 parent 9a78bbc commit 01f7106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 }},
Expand Down

0 comments on commit 01f7106

Please sign in to comment.