-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Bridgeconn/main
ci/cd for deploy
- Loading branch information
Showing
1 changed file
with
85 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Scribe Audio Resource | ||
|
||
on: | ||
push: | ||
branches: [deploy] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.17.0' | ||
|
||
- name: Install extension dependencies | ||
run: yarn install | ||
|
||
- name: Build UI | ||
run: cd src/webview && yarn install && yarn run build:all && cd ../.. | ||
|
||
- name: Package extension | ||
run: npm install -g @vscode/vsce && vsce package | ||
|
||
- name: Upload VSIX | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: audio-recorder | ||
path: './*.vsix' | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download VSIX | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: audio-resource | ||
path: ./audio-resource | ||
|
||
- name: Install jq | ||
run: sudo apt-get update && sudo apt-get install jq -y | ||
|
||
- name: Read Version from package.json | ||
run: echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SECRET_TOKEN }} | ||
with: | ||
tag_name: v${{ env.PACKAGE_VERSION }} | ||
release_name: Scribe-audio-resource ${{ env.PACKAGE_VERSION }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SECRET_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./audio-resource/scribe-audio-resource-${{ env.PACKAGE_VERSION }}.vsix | ||
asset_name: scribe-audio-resource-${{ env.PACKAGE_VERSION }}.vsix | ||
asset_content_type: application/zip | ||
|
||
# publish: | ||
# needs: release | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: install vsce | ||
# run: yarn add @vscode/vsce --dev | ||
# - name: Publish on VS market place | ||
# run: npm run deploy | ||
# env: | ||
# VSCE_PAT: ${{ secrets.VSCE_PAT }} |