Merge pull request #2 from Bridgeconn/main #2
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
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.18.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 }} |