-
Notifications
You must be signed in to change notification settings - Fork 20
63 lines (50 loc) · 1.77 KB
/
githubRelease.yml
File metadata and controls
63 lines (50 loc) · 1.77 KB
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
name: Deploy
on: deployment
jobs:
github-release:
if: github.event.deployment.environment == 'production'
name: Deploy to github
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v6
- name: Set up NodeJS
uses: actions/setup-node@v6
with:
node-version: 24
- name: Build artifacts
run: |
npm run build
- name: Release on github
run: |
if [ -z "$version" ]; then
version=$(ls gauge-* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//");
fi
echo "---------------------------"
echo "Updating release v$version"
echo "---------------------------"
echo -e "gauge-vscode $version\n\n" > desc.txt
release_description=$(ruby -e "$(curl -sSfL https://github.com/getgauge/gauge/raw/master/build/create_release_text.rb)" getgauge gauge-vscode)
echo "$release_description" >> desc.txt
gh release create --title "gauge-vscode v${version}" --notes-file ./desc.txt "v${version}" *.vsix
marketplace-release:
name: Deploy to marketplace
runs-on: ubuntu-latest
needs: [github-release]
env:
VS_PAT: '${{ secrets.VS_PAT }}'
steps:
- uses: actions/checkout@v6
- name: Set up NodeJS
uses: actions/setup-node@v6
with:
node-version: 24
- name: Build artifacts
run: |
npm run build
- name: Upload to marketplace
run: |
version=$(ls gauge-* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//");
npm install
npm run publish -- --packagePath gauge-$version.vsix -p $VS_PAT