Skip to content

Commit 15d4497

Browse files
committed
Fix release workflow
1 parent 2716f2c commit 15d4497

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525

2626
- name: Bump version and push
2727
run: |
28-
git config --global user.email "[email protected]"
28+
git config --global user.email "github-[email protected]"
2929
git config --global user.name "GitHub Actions"
3030
3131
npm version ${{ github.event.inputs.version }} --no-git-tag-version
3232
git add package.json package-lock.json
33-
git commit -m "Bump version to ${{ github.event.inputs.version }}"
33+
git commit -m "Release extension version ${{ github.event.inputs.version }}"
3434
3535
git push
3636
@@ -41,7 +41,9 @@ jobs:
4141
uses: actions/github-script@v6
4242
with:
4343
script: |
44-
const release = await octokit.repos.createRelease({
44+
const fs = require("fs");
45+
46+
const release = await github.rest.repos.createRelease({
4547
owner: context.repo.owner,
4648
repo: context.repo.repo,
4749
tag_name: "release-v${{ github.event.inputs.version }}",
@@ -51,7 +53,7 @@ jobs:
5153
});
5254
5355
const path = "./vscode-github-actions-${{ github.event.inputs.version }}.vsix";
54-
await octokit.repos.uploadReleaseAsset({
56+
await github.rest.repos.uploadReleaseAsset({
5557
owner: context.repo.owner,
5658
repo: context.repo.repo,
5759
release_id: release.data.id,
@@ -61,6 +63,7 @@ jobs:
6163
"content-type": "application/vsix",
6264
"content-length": fs.statSync(path).size
6365
}
66+
});
6467
6568
- name: Publish to marketplace
6669
# https://github.com/HaaLeo/publish-vscode-extension/releases/tag/v1.2.0

0 commit comments

Comments
 (0)