-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.74 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
name: Release
on:
workflow_dispatch:
jobs:
create-tag:
runs-on: ubuntu-latest
outputs:
tagname: ${{ steps.get_tag.outputs.tagname }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get tag from package.json
id: get_tag
run: |
VERSION=$(cat package.json | jq -r '.version')
echo "tagname=v${VERSION}" >> $GITHUB_OUTPUT
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.get_tag.outputs.tagname }}
build-extension:
needs: create-tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install requirements
run: npm i
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Build the extension
run: vsce package -o extension.vsix
- name: Upload the extension
uses: actions/upload-artifact@v4
with:
name: extension
path: ./extension.vsix
release:
runs-on: ubuntu-latest
needs: [create-tag, build-extension]
steps:
- name: Download extension
uses: actions/download-artifact@v4
with:
name: extension
path: ./extension.vsix
- name: test
run: ls -lah
# - name: Rename action
# run: mv extension.vsix ./namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix
# - name: Create release
# uses: softprops/action-gh-release@v2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ needs.create-tag.outputs.tagname }}
# name: ${{ needs.create-tag.outputs.tagname }}
# files: namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix