Skip to content

Commit 4ac1865

Browse files
author
Aaron Goodfellow
committed
feat(PI-4819): add GHA for azure extension publishing
1 parent 5ba0e92 commit 4ac1865

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

.github/workflows/workflow.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Workflow
2+
3+
on:
4+
pull_request:
5+
push:
6+
tags:
7+
- "v*.*.*"
8+
branches: [ "main" ]
9+
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: ./nowsecure
17+
setps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: 'npm'
25+
cache-dependency-path: ./nowsecure
26+
27+
- name: Install Dependencies
28+
run: npm ci
29+
30+
- name: Run Build
31+
run: npm run build
32+
33+
- name: Upload build artifact
34+
run: actions/upload-artifact@v4
35+
with:
36+
name: build-output
37+
path: ./nowseucre/dist/
38+
39+
package:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
defaults:
43+
run:
44+
working-directory: ./nowsecure
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Download Build
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: build-output
51+
path: dist/
52+
path: ./nowsecure/dist/
53+
54+
- name: Setup Node
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: 20
58+
cache: 'npm'
59+
cache-dependency-path: ./nowsecure
60+
61+
- name: Install TFX
62+
run: npm install -g tfx-cli
63+
64+
- name: Package Extension
65+
run: tfx extension create --manifest-globs vss-extension.json --rev-version
66+
67+
- name: Upload VSIX
68+
run: actions/upload-artifact@4
69+
with:
70+
name: vsix-pr-${{ github.events.pull_request.number }}
71+
path: '*.vsix'
72+
73+
publish:
74+
needs: build
75+
runs-on: ubuntu-latest
76+
if: startsWith(github.ref, 'refs/tags/v')
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@v4
80+
- name: Download Build
81+
uses: actions/download-artifact@v4
82+
with:
83+
name: build-output
84+
path: ./nowsecucre/dist/
85+
86+
- name: Setup Node
87+
uses: actions/setup-node@v4
88+
with:
89+
node-version: 20
90+
cache: 'npm'
91+
92+
- name: Install TFX
93+
run: npm install -g tfx-cli
94+
95+
- name: Update Manifest Version
96+
run: npm install -g tfx-cli

0 commit comments

Comments
 (0)