-
Notifications
You must be signed in to change notification settings - Fork 43
45 lines (43 loc) · 1.5 KB
/
createRelease.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
name: Create Release and Publish
on:
workflow_dispatch:
jobs:
release-and-publish:
name: Release and Publish
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: yarn install
- run: yarn test
- run: npm install -g vsce
- run: vsce package
- run: |
$path = (Get-ChildItem '*.vsix')
$name = (Split-Path (Get-Item -Path '*.vsix') -leaf)
"VSIX_PATH=$path" >> $env:GITHUB_ENV
"VSIX_NAME=$name" >> $env:GITHUB_ENV
$json = (Get-Content 'package.json' | ConvertFrom-Json)
$version = $json.version
"VERSION=v$version" >> $env:GITHUB_ENV
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: "Release ${{ env.VERSION }}"
body: See [Change Log](https://github.com/waldo1001/crs-al-language-extension/blob/master/CHANGELOG.md) for details.
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.VSIX_PATH }}
asset_name: ${{ env.VSIX_NAME }}
asset_content_type: application/zip
- run: vsce publish -p ${{ secrets.VSCE_TOKEN }}