Skip to content

Commit e86c948

Browse files
authored
Fix release.yml break by upgrading actions/github-script (#3772)
1 parent dc9695f commit e86c948

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/release.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
with:
2121
github-token: ${{secrets.GITHUB_TOKEN}}
2222
script: |
23-
const core = require('@actions/core')
2423
const fs = require('fs');
2524
const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '')
2625
const releaseVersion = fs.readFileSync('${{ github.workspace }}/releaseVersion', 'utf8').replace(/\n$/g, '')
@@ -30,7 +29,7 @@ jobs:
3029
return
3130
}
3231
try {
33-
const release = await github.repos.getReleaseByTag({
32+
const release = await github.rest.repos.getReleaseByTag({
3433
owner: '${{ github.event.repository.owner.name }}',
3534
repo: '${{ github.event.repository.name }}',
3635
tag: 'v' + runnerVersion
@@ -176,7 +175,6 @@ jobs:
176175
with:
177176
github-token: ${{secrets.GITHUB_TOKEN}}
178177
script: |
179-
const core = require('@actions/core')
180178
const fs = require('fs');
181179
const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '')
182180
var releaseNote = fs.readFileSync('${{ github.workspace }}/releaseNote.md', 'utf8').replace(/<RUNNER_VERSION>/g, runnerVersion)

0 commit comments

Comments
 (0)