-
Notifications
You must be signed in to change notification settings - Fork 899
chore: split release workflow so the majority happens on Linux #2092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
be842a0
chore: split release workflow so the majority happens on Linux
deansheather 9ddb587
fixup! chore: split release workflow so the majority happens on Linux
deansheather 2b8d9cb
chore: add dry-run functionality to release workflow
deansheather d638c6e
fixup! chore: add dry-run functionality to release workflow
deansheather ec1064b
fixup! chore: add dry-run functionality to release workflow
deansheather 6b09749
fixup! chore: add dry-run functionality to release workflow
deansheather 8d0992d
chore: add retry for apple notarization
deansheather 5cf8b28
fixup! chore: add retry for apple notarization
deansheather ea01e6e
fixup! chore: add retry for apple notarization
deansheather 2116601
fixup! chore: add retry for apple notarization
deansheather 2c3a65a
fixup! chore: add retry for apple notarization
deansheather File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- rm -f site/out/bin/coder* | ||
|
||
archives: | ||
- id: coder-darwin | ||
builds: [coder-darwin] | ||
format: zip | ||
|
||
builds: | ||
- id: coder-slim | ||
dir: cmd/coder | ||
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"] | ||
env: [CGO_ENABLED=0] | ||
goos: [darwin, linux, windows] | ||
goarch: [amd64, arm, arm64] | ||
goarm: ["7"] | ||
# Only build arm 7 for Linux | ||
ignore: | ||
- goos: windows | ||
goarm: "7" | ||
- goos: darwin | ||
goarm: "7" | ||
hooks: | ||
# The "trimprefix" appends ".exe" on Windows. | ||
post: | | ||
cp {{.Path}} site/out/bin/coder-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ trimprefix .Name "coder" }} | ||
|
||
- id: coder-darwin | ||
dir: cmd/coder | ||
flags: [-tags=embed] | ||
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"] | ||
env: [CGO_ENABLED=0] | ||
goos: [darwin] | ||
goarch: [amd64, arm64] | ||
hooks: | ||
# This signs the binary that will be located inside the zip. MacOS | ||
# requires the binary to be signed for notarization. | ||
post: | | ||
sh -c 'codesign -s {{.Env.AC_APPLICATION_IDENTITY}} -f -v --timestamp --options runtime {{.Path}}' | ||
|
||
env: | ||
# Apple identity for signing! | ||
- AC_APPLICATION_IDENTITY=BDB050EB749EDD6A80C6F119BF1382ECA119CCCC | ||
|
||
signs: | ||
- ids: [coder-darwin] | ||
artifacts: archive | ||
cmd: ./scripts/sign_macos.sh | ||
args: ["${artifact}"] | ||
output: true | ||
|
||
release: | ||
ids: [coder-darwin] | ||
|
||
snapshot: | ||
name_template: "{{ .Version }}-devel+{{ .ShortCommit }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- rm -f site/out/bin/coder* | ||
|
||
archives: | ||
- id: coder-linux | ||
builds: [coder-linux] | ||
format: tar.gz | ||
|
||
- id: coder-windows | ||
builds: [coder-windows] | ||
format: zip | ||
|
||
builds: | ||
- id: coder-slim | ||
dir: cmd/coder | ||
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"] | ||
env: [CGO_ENABLED=0] | ||
goos: [darwin, linux, windows] | ||
goarch: [amd64, arm, arm64] | ||
goarm: ["7"] | ||
# Only build arm 7 for Linux | ||
ignore: | ||
- goos: windows | ||
goarm: "7" | ||
- goos: darwin | ||
goarm: "7" | ||
hooks: | ||
# The "trimprefix" appends ".exe" on Windows. | ||
post: | | ||
cp {{.Path}} site/out/bin/coder-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ trimprefix .Name "coder" }} | ||
|
||
- id: coder-linux | ||
dir: cmd/coder | ||
flags: [-tags=embed] | ||
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"] | ||
env: [CGO_ENABLED=0] | ||
goos: [linux] | ||
goarch: [amd64, arm, arm64] | ||
goarm: ["7"] | ||
|
||
- id: coder-windows | ||
dir: cmd/coder | ||
flags: [-tags=embed] | ||
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"] | ||
env: [CGO_ENABLED=0] | ||
goos: [windows] | ||
goarch: [amd64, arm64] | ||
|
||
release: | ||
ids: [coder-windows, coder-linux] | ||
|
||
snapshot: | ||
name_template: "{{ .Version }}-devel+{{ .ShortCommit }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# This goreleaser config file requires GoReleaser Pro as it uses the prebuilt | ||
# builder type. | ||
|
||
archives: | ||
- id: coder-linux | ||
builds: [release-prebuilt-linux] | ||
format: tar.gz | ||
|
||
builds: | ||
- id: release-prebuilt-linux | ||
builder: prebuilt | ||
goos: [linux] | ||
goarch: [amd64, arm, arm64] | ||
goarm: ["7"] | ||
prebuilt: | ||
path: artifacts/coder-linux_{{.Os}}_{{.Arch}}{{ with .Arm }}_{{ . }}{{ end }}/coder | ||
|
||
# This section is also contained in .goreleaser.yaml. | ||
nfpms: | ||
- id: packages | ||
vendor: Coder | ||
homepage: https://coder.com | ||
maintainer: Coder <support@coder.com> | ||
description: | | ||
Provision development environments with infrastructure with code | ||
formats: | ||
- apk | ||
- deb | ||
- rpm | ||
suggests: | ||
- postgresql | ||
builds: | ||
- release-prebuilt-linux | ||
bindir: /usr/bin | ||
contents: | ||
- src: coder.env | ||
dst: /etc/coder.d/coder.env | ||
type: "config|noreplace" | ||
- src: coder.service | ||
dst: /usr/lib/systemd/system/coder.service | ||
|
||
# Image templates are empty on snapshots to avoid lengthy builds for | ||
# development. | ||
dockers: | ||
- image_templates: ["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-amd64{{ end }}"] | ||
id: release-prebuilt-linux | ||
dockerfile: Dockerfile | ||
use: buildx | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
- --label=org.opencontainers.image.title=Coder | ||
- --label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform. | ||
- --label=org.opencontainers.image.url=https://github.com/coder/coder | ||
- --label=org.opencontainers.image.source=https://github.com/coder/coder | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=AGPL-3.0 | ||
- image_templates: ["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-arm64{{ end }}"] | ||
goarch: arm64 | ||
dockerfile: Dockerfile | ||
use: buildx | ||
build_flag_templates: | ||
- --platform=linux/arm64/v8 | ||
- --label=org.opencontainers.image.title=coder | ||
- --label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform. | ||
- --label=org.opencontainers.image.url=https://github.com/coder/coder | ||
- --label=org.opencontainers.image.source=https://github.com/coder/coder | ||
- --label=org.opencontainers.image.version={{ .Tag }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=AGPL-3.0 | ||
- image_templates: ["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-armv7{{ end }}"] | ||
goarch: arm | ||
goarm: "7" | ||
dockerfile: Dockerfile | ||
use: buildx | ||
build_flag_templates: | ||
- --platform=linux/arm/v7 | ||
- --label=org.opencontainers.image.title=Coder | ||
- --label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform. | ||
- --label=org.opencontainers.image.url=https://github.com/coder/coder | ||
- --label=org.opencontainers.image.source=https://github.com/coder/coder | ||
- --label=org.opencontainers.image.version={{ .Tag }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=AGPL-3.0 | ||
|
||
docker_manifests: | ||
- name_template: ghcr.io/coder/coder:{{ .Tag }} | ||
image_templates: | ||
- ghcr.io/coder/coder:{{ .Tag }}-amd64 | ||
- ghcr.io/coder/coder:{{ .Tag }}-arm64 | ||
- ghcr.io/coder/coder:{{ .Tag }}-armv7 | ||
|
||
release: | ||
ids: [release-prebuilt-linux, packages] | ||
footer: | | ||
## Container Image | ||
- `docker pull ghcr.io/coder/coder:{{ .Tag }}` | ||
# All non-Linux files should just be used as is. We have to import the Linux | ||
# builds so that the docker images get built and package creation works. | ||
extra_files: | ||
- glob: ./artifacts/coder_*_darwin_*.zip | ||
- glob: ./artifacts/coder_*_windows_*.zip | ||
|
||
snapshot: | ||
name_template: "{{ .Version }}-devel+{{ .ShortCommit }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.