-
Notifications
You must be signed in to change notification settings - Fork 3
177 lines (149 loc) · 4.97 KB
/
release.yml
File metadata and controls
177 lines (149 loc) · 4.97 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Release
on:
push:
branches:
- main
permissions: {}
concurrency:
group: release
cancel-in-progress: false
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Compile
run: pnpm vsce package
env:
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect
NODE_ENV: ci
- name: Test
run: xvfb-run -a pnpm vscode-test
release:
name: Release
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
issues: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
steps:
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
release-type: node
token: ${{ secrets.LOCALSTACK_BOT_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.release_created == 'true' }}
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build VSIX
run: pnpm vsce package
env:
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect
NODE_ENV: production
ANALYTICS_API_URL: https://analytics.localstack.cloud/v1/events
- name: Upload VSIX artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vsix
path: "*.vsix"
publish-github-release-artifact:
name: Publish artifact to GitHub Release
runs-on: ubuntu-latest
needs: [build, release]
if: ${{ needs.release.outputs.release_created == 'true' }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Download VSIX
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vsix
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEEDS_RELEASE_OUTPUTS_TAG_NAME: ${{ needs.release.outputs.tag_name }}
run: gh release upload ${NEEDS_RELEASE_OUTPUTS_TAG_NAME} *.vsix
publish-vscode-marketplace:
name: Publish to VS Marketplace
runs-on: ubuntu-latest
needs: [build, release]
if: ${{ needs.release.outputs.release_created == 'true' }}
permissions: {}
steps:
- name: Download VSIX
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vsix
- name: Setup pnpm
uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
with:
version: 10
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- name: Publish to VS Marketplace
run: pnpm dlx @vscode/vsce publish --packagePath *.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
publish-ovsx:
name: Publish to Open VSX
runs-on: ubuntu-latest
needs: [build, release]
if: ${{ needs.release.outputs.release_created == 'true' }}
permissions: {}
steps:
- name: Download VSIX
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vsix
- name: Setup pnpm
uses: pnpm/action-setup@903f9c1a6ebcba6cf41d87230be49611ac97822e # v6.0.3
with:
version: 10
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- name: Publish to Open VSX
run: pnpm dlx ovsx publish *.vsix -p $OVSX_PAT
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}