-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (70 loc) · 2.26 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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.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-resource
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 }}