Skip to content

Commit 4ed419c

Browse files
committed
merge main
2 parents 4edb649 + a86c957 commit 4ed419c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1894
-558
lines changed

.github/.goreleaser-release-linux.yaml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/.goreleaser-release.yaml

Lines changed: 0 additions & 105 deletions
This file was deleted.

.github/workflows/coder.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ jobs:
226226
token: ${{ secrets.CODECOV_TOKEN }}
227227
files: ./gotests.coverage
228228
flags: unittest-go-${{ matrix.os }}
229-
# this flakes and sometimes fails the build
229+
# this flakes and sometimes fails the build
230230
fail_ci_if_error: false
231231

232232
test-go-postgres:
@@ -310,7 +310,7 @@ jobs:
310310
token: ${{ secrets.CODECOV_TOKEN }}
311311
files: ./gotests.coverage
312312
flags: unittest-go-postgres-${{ matrix.os }}
313-
# this flakes and sometimes fails the build
313+
# this flakes and sometimes fails the build
314314
fail_ci_if_error: false
315315

316316
deploy:
@@ -437,7 +437,7 @@ jobs:
437437
token: ${{ secrets.CODECOV_TOKEN }}
438438
files: ./site/coverage/lcov.info
439439
flags: unittest-js
440-
# this flakes and sometimes fails the build
440+
# this flakes and sometimes fails the build
441441
fail_ci_if_error: false
442442

443443
- name: Upload DataDog Trace

.github/workflows/release.yaml

Lines changed: 17 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,33 @@
1-
# GitHub release workflow.
2-
#
3-
# This workflow is a bit complicated because we have to build darwin binaries on
4-
# a mac runner, but the mac runners are extremely slow. So instead of running
5-
# the entire release on a mac (which will take an hour to run), we run only the
6-
# mac build on a mac, and the rest on a linux runner. The final release is then
7-
# published using a final linux runner.
81
name: release
92
on:
103
push:
114
tags:
125
- "v*"
136
workflow_dispatch:
14-
inputs:
15-
snapshot:
16-
description: Perform a snapshot/dry-run release (will not create a GitHub release, required if the ref is not a tag)
17-
type: boolean
18-
required: true
197

208
jobs:
21-
linux-windows:
22-
runs-on: ubuntu-latest
9+
goreleaser:
10+
runs-on: macos-latest
11+
env:
12+
# Necessary for Docker manifest
13+
DOCKER_CLI_EXPERIMENTAL: "enabled"
2314
steps:
15+
# Docker is not included on macos-latest
16+
- uses: docker-practice/actions-setup-docker@1.0.10
17+
2418
- uses: actions/checkout@v3
2519
with:
2620
fetch-depth: 0
2721

28-
- uses: actions/setup-go@v3
29-
with:
30-
go-version: "~1.18"
31-
32-
- name: Echo Go Cache Paths
33-
id: go-cache-paths
34-
run: |
35-
echo "::set-output name=go-build::$(go env GOCACHE)"
36-
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
37-
38-
- name: Go Build Cache
39-
uses: actions/cache@v3
40-
with:
41-
path: ${{ steps.go-cache-paths.outputs.go-build }}
42-
key: ${{ runner.os }}-release-go-build-${{ hashFiles('**/go.sum') }}
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
4324

44-
- name: Go Mod Cache
45-
uses: actions/cache@v3
46-
with:
47-
path: ${{ steps.go-cache-paths.outputs.go-mod }}
48-
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
49-
50-
- name: Cache Node
51-
id: cache-node
52-
uses: actions/cache@v3
53-
with:
54-
path: |
55-
**/node_modules
56-
.eslintcache
57-
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
58-
restore-keys: |
59-
js-${{ runner.os }}-
60-
61-
- name: Build Site
62-
run: make site/out/index.html
63-
64-
- name: Build Linux and Windows binaries with GoReleaser
65-
uses: goreleaser/goreleaser-action@v3
66-
with:
67-
version: latest
68-
args: release -f ./.github/.goreleaser-release-linux.yaml --rm-dist --timeout 60m --skip-publish --skip-announce ${{ github.event.inputs.snapshot && '--snapshot' }}
69-
70-
- name: Upload binary artifacts
71-
uses: actions/upload-artifact@v3
72-
with:
73-
name: linux
74-
path: ./dist/coder*
75-
76-
# The mac binaries get built on mac runners because they need to be signed,
77-
# and the signing tool only runs on mac. This darwin job only builds the Mac
78-
# binaries and uploads them as job artifacts used by the publish step.
79-
darwin:
80-
runs-on: macos-latest
81-
steps:
82-
- uses: actions/checkout@v3
25+
- name: Docker Login
26+
uses: docker/login-action@v2
8327
with:
84-
fetch-depth: 0
28+
registry: ghcr.io
29+
username: ${{ github.repository_owner }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
8531

8632
- uses: actions/setup-go@v3
8733
with:
@@ -133,69 +79,12 @@ jobs:
13379
- name: Build Site
13480
run: make site/out/index.html
13581

136-
- name: Build Darwin binaries with GoReleaser
137-
uses: goreleaser/goreleaser-action@v3
138-
with:
139-
version: latest
140-
args: release -f ./.github/.goreleaser-release-darwin.yaml --rm-dist --timeout 60m --skip-publish --skip-announce ${{ github.event.inputs.snapshot && '--snapshot' }}
141-
env:
142-
AC_USERNAME: ${{ secrets.AC_USERNAME }}
143-
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
144-
145-
- name: Upload binary artifacts
146-
uses: actions/upload-artifact@v3
147-
with:
148-
name: darwin
149-
path: ./dist/coder*
150-
151-
publish:
152-
runs-on: ubuntu-latest
153-
needs:
154-
- linux-windows
155-
- darwin
156-
env:
157-
# Necessary for Docker manifest
158-
DOCKER_CLI_EXPERIMENTAL: "enabled"
159-
steps:
160-
- uses: actions/checkout@v3
161-
with:
162-
fetch-depth: 0
163-
164-
- name: Docker Login
165-
uses: docker/login-action@v2
166-
with:
167-
registry: ghcr.io
168-
username: ${{ github.repository_owner }}
169-
password: ${{ secrets.GITHUB_TOKEN }}
170-
171-
- name: mkdir artifacts
172-
run: mkdir artifacts
173-
174-
- name: Download darwin artifacts
175-
uses: actions/download-artifact@v3
176-
with:
177-
name: darwin
178-
path: ./artifacts
179-
180-
- name: Download Linux and Windows artifacts
181-
uses: actions/download-artifact@v3
182-
with:
183-
name: linux
184-
path: ./artifacts
185-
186-
- name: ls ./artifacts
187-
run: ls ./artifacts
188-
189-
# This will build Docker images and Linux packages.
190-
- name: Publish release
82+
- name: Run GoReleaser
19183
uses: goreleaser/goreleaser-action@v3
19284
with:
193-
# we use the "prebuilt" builder here which is a pro-only feature
194-
distribution: goreleaser-pro
19585
version: latest
196-
args: release -f ./.github/.goreleaser-release.yaml --rm-dist --timeout 60m ${{ github.event.inputs.snapshot && '--snapshot' }}
86+
args: release --rm-dist --timeout 60m
19787
env:
198-
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
19988
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20089
AC_USERNAME: ${{ secrets.AC_USERNAME }}
20190
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ site/build-storybook.log
3131
# Build
3232
dist/
3333
site/out/
34-
# used by release CI for downloaded artifacts
35-
artifacts
3634

3735
*.tfstate
3836
*.tfplan

0 commit comments

Comments
 (0)