-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Apply reusable workflow in release workflows (#1479)
This commit change publish-extension to reusable workflow. And it introduces nightly-release for nightly build on behalf of publish-extension. ONE-vscode-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>
- Loading branch information
Showing
3 changed files
with
45 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Nightly release | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# 05:00 AM (KST) Mon-Fri | ||
- cron: '00 20 * * 0-4' | ||
|
||
jobs: | ||
publish-extension: | ||
uses: ./.github/workflows/publish-extension.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
name: Publish extension | ||
|
||
on: | ||
repository_dispatch: | ||
types: [ publish-extension ] | ||
schedule: | ||
# 05:00 AM (KST) Mon-Fri | ||
- cron: '00 20 * * 0-4' | ||
workflow_call: | ||
inputs: | ||
prerelease: | ||
description: 'Identify the release as a prerelease (default: false)' | ||
type: string | ||
default: false | ||
outputs: | ||
package_name: | ||
description: 'Package name' | ||
value: ${{ jobs.publish-extension.outputs.package_name }} | ||
|
||
jobs: | ||
publish-extension: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
package_name: ${{ steps.search_package.outputs.package_name }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
node-version: 16 | ||
- name: Install node packages | ||
run: | | ||
npm install | ||
- name: Install vsce tool | ||
run: | | ||
npm install -g vsce | ||
- name: Build vsix package | ||
- name: Create vsix package (pre-release) | ||
if: ${{ inputs.prerelease == 'true' }} | ||
run: | | ||
vsce package --pre-release | ||
- name: Create vsix package | ||
if: ${{ inputs.prerelease == 'false' }} | ||
run: | | ||
vsce package | ||
# TODO Enable publish job | ||
- name: Publish vsix package | ||
if: ${{ false }} | ||
- id: search_package | ||
run: | | ||
vsce publish | ||
fname=$(find . -name "*.vsix" | xargs -I {} basename {}) | ||
echo "package_name=${fname}" >> $GITHUB_OUTPUT | ||
- name: Upload vsix package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: one-vscode-extension | ||
path: ./*.vsix | ||
name: ${{ steps.search_package.outputs.package_name }} | ||
path: ./${{ steps.search_package.outputs.package_name }} |