-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.34 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
name: Build and Release VSCode Extension
on:
workflow_dispatch:
inputs:
releaseTag:
description: 'Release Tag'
required: true
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Update Version in package.json
run: |
# Read the provided GitHub tag from the workflow input
tag_name=${{ github.event.inputs.releaseTag }}
# Update the version field in package.json
sed -i "s/\"version\": \".*\"/\"version\": \"$tag_name\"/" package.json
- name: Build VSCode Extension
run: |
npm i
npm run vscode:prepublish
npm install -g vsce
vsce package -o fastn-vscode-${{ github.event.inputs.releaseTag }}.vsix
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: "*.vsix"
body: |
Install the extension and open any `.ftd` file to automatically enable syntax highlighting.
Checkout https://fastn.com/vscode/ for installation instructions!
tag_name: ${{ github.event.inputs.releaseTag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}