Skip to content

Commit ac8f792

Browse files
committed
Split workflow into a release and publish job
1 parent e1449aa commit ac8f792

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ on:
88
description: "Version to bump `package.json` to (format: x.y.z)"
99

1010
jobs:
11-
build:
12-
environment: release
13-
11+
release:
1412
runs-on: ubuntu-latest
1513

1614
permissions:
@@ -37,6 +35,11 @@ jobs:
3735
- run: npm ci
3836
- run: npm run package
3937

38+
- uses: actions/upload-artifact@v3
39+
with:
40+
name: vscode-github-actions-${{ github.event.inputs.version }}.vsix
41+
path: ./vscode-github-actions-${{ github.event.inputs.version }}.vsix
42+
4043
- name: Create release and upload release asset
4144
uses: actions/github-script@v6
4245
with:
@@ -65,6 +68,19 @@ jobs:
6568
}
6669
});
6770
71+
publish:
72+
environment: publish
73+
74+
needs: release
75+
76+
runs-on: ubuntu-latest
77+
permissions: {}
78+
79+
steps:
80+
- uses: actions/download-artifact@v3
81+
with:
82+
name: vscode-github-actions-${{ github.event.inputs.version }}.vsix
83+
6884
- name: Publish to marketplace
6985
# https://github.com/HaaLeo/publish-vscode-extension/releases/tag/v1.2.0
7086
uses: HaaLeo/publish-vscode-extension@c1a0486c5a3eed24e8c21d4e37889a7c4c60c443

0 commit comments

Comments
 (0)