@@ -3,28 +3,107 @@ name: Publish nightly release
33on :
44 push :
55 branches : [main]
6+ tags :
7+ - " v*.*.*"
8+ workflow_dispatch :
69
710jobs :
8- archive-build-artifacts :
9- runs-on : ubuntu-latest
11+ create-build-artifacts :
12+ strategy :
13+ matrix :
14+ # VSIX architextures: https://github.com/microsoft/vscode-vsce/blob/main/src/package.ts
15+ arch :
16+ [
17+ {
18+ bricks_arch : darwin_arm64,
19+ vsix_arch : darwin-arm64,
20+ os : macos-latest,
21+ },
22+ {
23+ bricks_arch : darwin_amd64,
24+ vsix_arch : darwin-x64,
25+ os : macos-latest,
26+ },
27+ {
28+ bricks_arch : linux_arm64,
29+ vsix_arch : linux-arm64,
30+ os : ubuntu-latest,
31+ },
32+ {
33+ bricks_arch : linux_amd64,
34+ vsix_arch : linux-x64,
35+ os : ubuntu-latest,
36+ },
37+ {
38+ bricks_arch : windows_arm64,
39+ vsix_arch : win32-arm64,
40+ os : windows-latest,
41+ },
42+ {
43+ bricks_arch : windows_amd64,
44+ vsix_arch : win32-x64,
45+ os : windows-latest,
46+ },
47+ {
48+ bricks_arch : windows_386,
49+ vsix_arch : win32-ia32,
50+ os : windows-latest,
51+ },
52+ ]
53+ node-version : [16.x]
54+
55+ runs-on : ${{ matrix.arch.os }}
56+
57+ env :
58+ BRICKS_ARCH : ${{ matrix.arch.bricks_arch }}
59+
1060 steps :
1161 - uses : actions/checkout@v3
1262
13- - name : Use Node.js 18.x
63+ - name : Use Node.js ${{ matrix.node-version }}
1464 uses : actions/setup-node@v3
1565 with :
16- node-version : 18.x
66+ node-version : ${{ matrix.node-version }}
1767
1868 - run : yarn install
1969 - run : yarn run build
2070
21- - run : yarn run package
71+ - run : yarn run package:cli:fetch
2272 working-directory : packages/databricks-vscode
73+ env :
74+ # TODO: Remove this once the bricks repo is public
75+ GH_TOKEN : ${{ secrets.DECO_GITHUB_TOKEN }}
76+
77+ - run : yarn run package -t ${{ matrix.arch.vsix_arch }}
78+ working-directory : packages/databricks-vscode
79+
80+ - uses : actions/upload-artifact@v2
81+ with :
82+ name : databricks-${{ matrix.arch.vsix_arch }}
83+ path : " packages/databricks-vscode/*.vsix"
84+
85+ create-release :
86+ needs : " create-build-artifacts"
87+ runs-on : ubuntu-latest
88+
89+ steps :
90+ - uses : actions/download-artifact@v3
91+ with :
92+ path : packages/databricks-vscode
93+
94+ - run : ls -lR packages/databricks-vscode
2395
2496 - name : Update nightly release
25- uses : eine/tip@master
97+ uses : pyTooling/Actions/releaser@r0
98+ if : startsWith(github.ref, 'refs/heads/')
2699 with :
27100 tag : nightly
28101 rm : true
29102 token : ${{ secrets.GITHUB_TOKEN }}
30- files : " packages/databricks-vscode/*.vsix"
103+ files : " packages/databricks-vscode/databricks*/*.vsix"
104+
105+ - name : Release
106+ uses : softprops/action-gh-release@v1
107+ if : startsWith(github.ref, 'refs/tags/')
108+ with :
109+ files : " packages/databricks-vscode/databricks*/*.vsix"
0 commit comments