File tree 5 files changed +31
-25
lines changed
5 files changed +31
-25
lines changed Original file line number Diff line number Diff line change @@ -355,21 +355,21 @@ jobs:
355
355
path : ${{ steps.go-cache-paths.outputs.go-mod }}
356
356
key : ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
357
357
358
- - uses : goreleaser/goreleaser-action@v3
359
- with :
360
- install-only : true
361
-
362
358
- name : Cache Node
363
359
id : cache-node
364
360
uses : actions/cache@v3
365
361
with :
366
362
path : |
367
363
**/node_modules
368
364
.eslintcache
369
- key : js-${{ runner.os }}-test -${{ hashFiles('**/yarn.lock') }}
365
+ key : js-${{ runner.os }}-release-node -${{ hashFiles('**/yarn.lock') }}
370
366
restore-keys : |
371
367
js-${{ runner.os }}-
372
368
369
+ - uses : goreleaser/goreleaser-action@v3
370
+ with :
371
+ install-only : true
372
+
373
373
- name : Build site
374
374
run : make -B site/out/index.html
375
375
@@ -379,18 +379,6 @@ jobs:
379
379
version : latest
380
380
args : release --snapshot --rm-dist --skip-sign
381
381
382
- - uses : actions/upload-artifact@v3
383
- with :
384
- name : coder_windows_amd64.zip
385
- path : ./dist/coder_*_windows_amd64.zip
386
- retention-days : 7
387
-
388
- - uses : actions/upload-artifact@v3
389
- with :
390
- name : coder_linux_amd64.tar.gz
391
- path : ./dist/coder_*_linux_amd64.tar.gz
392
- retention-days : 7
393
-
394
382
- name : Install Release
395
383
run : |
396
384
gcloud config set project coder-dogfood
@@ -402,6 +390,14 @@ jobs:
402
390
- name : Start
403
391
run : gcloud compute ssh coder -- sudo service coder restart
404
392
393
+ - uses : actions/upload-artifact@v3
394
+ with :
395
+ name : coder
396
+ path : |
397
+ ./dist/coder_*_linux_amd64.tar.gz
398
+ ./dist/coder_*_windows_amd64.zip
399
+ retention-days : 7
400
+
405
401
test-js :
406
402
name : " test/js"
407
403
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 94
94
- src : coder.service
95
95
dst : /usr/lib/systemd/system/coder.service
96
96
97
+ # Image templates are empty on snapshots to avoid lengthy builds for development.
97
98
dockers :
98
- - image_templates : ["ghcr.io/coder/coder:{{ .Tag }}-amd64"]
99
+ - image_templates : ["{{ if not .IsSnapshot }} ghcr.io/coder/coder:{{ .Tag }}-amd64{{ end }} "]
99
100
id : coder-linux
100
101
dockerfile : Dockerfile
101
102
use : buildx
@@ -108,7 +109,7 @@ dockers:
108
109
- --label=org.opencontainers.image.version={{ .Version }}
109
110
- --label=org.opencontainers.image.revision={{ .FullCommit }}
110
111
- --label=org.opencontainers.image.licenses=AGPL-3.0
111
- - image_templates : ["ghcr.io/coder/coder:{{ .Tag }}-arm64"]
112
+ - image_templates : ["{{ if not .IsSnapshot }} ghcr.io/coder/coder:{{ .Tag }}-arm64{{ end }} "]
112
113
goarch : arm64
113
114
dockerfile : Dockerfile
114
115
use : buildx
@@ -121,7 +122,7 @@ dockers:
121
122
- --label=org.opencontainers.image.version={{ .Tag }}
122
123
- --label=org.opencontainers.image.revision={{ .FullCommit }}
123
124
- --label=org.opencontainers.image.licenses=AGPL-3.0
124
- - image_templates : ["ghcr.io/coder/coder:{{ .Tag }}-armv7"]
125
+ - image_templates : ["{{ if not .IsSnapshot }} ghcr.io/coder/coder:{{ .Tag }}-armv7{{ end }} "]
125
126
goarch : arm
126
127
goarm : " 7"
127
128
dockerfile : Dockerfile
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const dashboardHTMLPluginConfig = new HtmlWebpackPlugin({
38
38
template : path . join ( templatePath , "index.html" ) ,
39
39
} )
40
40
41
- export const commonWebpackConfig : Configuration = {
41
+ export const createCommonWebpackConfig = ( options ?: { skipTypecheck : boolean } ) : Configuration => ( {
42
42
// entry defines each "page" or "chunk". In v1, we have two "pages":
43
43
// dashboard and terminal. This is desired because the terminal has the xterm
44
44
// vendor, and it is undesireable to load all of xterm on a dashboard
@@ -78,6 +78,7 @@ export const commonWebpackConfig: Configuration = {
78
78
loader : "ts-loader" ,
79
79
options : {
80
80
configFile : "tsconfig.prod.json" ,
81
+ transpileOnly : options ?. skipTypecheck ,
81
82
} ,
82
83
} ,
83
84
] ,
@@ -106,4 +107,4 @@ export const commonWebpackConfig: Configuration = {
106
107
107
108
// plugins customize the build process
108
109
plugins : [ environmentPlugin , dashboardHTMLPluginConfig ] ,
109
- }
110
+ } )
Original file line number Diff line number Diff line change 5
5
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin"
6
6
import { Configuration } from "webpack"
7
7
import "webpack-dev-server"
8
- import { commonWebpackConfig } from "./webpack.common"
8
+ import { createCommonWebpackConfig } from "./webpack.common"
9
+
10
+ const commonWebpackConfig = createCommonWebpackConfig ( )
9
11
10
12
const commonPlugins = commonWebpackConfig . plugins || [ ]
11
13
12
14
const commonRules = commonWebpackConfig . module ?. rules || [ ]
13
15
14
16
const config : Configuration = {
15
- ...commonWebpackConfig ,
17
+ ...createCommonWebpackConfig ,
16
18
17
19
// devtool controls how source maps are generated. In development, we want
18
20
// more details (less optimized) for more readability and an easier time
Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ import CopyWebpackPlugin from "copy-webpack-plugin"
6
6
import CSSMinimizerPlugin from "css-minimizer-webpack-plugin"
7
7
import MiniCSSExtractPlugin from "mini-css-extract-plugin"
8
8
import { Configuration } from "webpack"
9
- import { commonWebpackConfig } from "./webpack.common"
9
+ import { createCommonWebpackConfig } from "./webpack.common"
10
+
11
+ const commonWebpackConfig = createCommonWebpackConfig ( {
12
+ // This decreases compilation time when publishing releases.
13
+ // The "test/js" step will already catch any TypeScript compilation errors.
14
+ skipTypecheck : true ,
15
+ } )
10
16
11
17
const commonPlugins = commonWebpackConfig . plugins || [ ]
12
18
You can’t perform that action at this time.
0 commit comments