Skip to content

Commit

Permalink
Merge pull request #1 from Bridgeconn/main
Browse files Browse the repository at this point in the history
ci/cd for deploy
  • Loading branch information
vipinpaul authored May 16, 2024
2 parents 688126d + fd6330a commit be613f3
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit be613f3

Please sign in to comment.