Skip to content

Commit

Permalink
update goreleaser manifest by replacing deprecated name_template (#184)
Browse files Browse the repository at this point in the history
* update goreleaser manifest by replacing deprecated

* Removing old archives section leftover

* Replace brew.tap with brew.repository

* Modify brew.repository to be an object instad of an array how doc incorrectly says

* Updated [email protected] [email protected] and added editorconfig
  • Loading branch information
shakahl authored Jan 11, 2024
1 parent 3bd401e commit 58205c0
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 66 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
; https://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
indent_style = tab
indent_size = 4

[*.md]
indent_size = 4
trim_trailing_whitespace = false

eclint_indent_style = unset

[Dockerfile]
indent_size = 4

28 changes: 14 additions & 14 deletions .github/workflows/bootstrap-templates.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Publish
on:
push:
tags: ['*']
branches: ['bootstrapper']
tags: ["*"]
branches: ["bootstrapper"]

jobs:
# The publish job will publish the bootstrap-templates directory to the correct S3 Bucket
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl private --follow-symlinks
env:
# Credentials for this workflow are provisioned in the `terraform` directory
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: truss-cli-global-config
AWS_REGION: us-east-2
SOURCE_DIR: bootstrap-templates
DEST_DIR: bootstrap-templates
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl private --follow-symlinks
env:
# Credentials for this workflow are provisioned in the `terraform` directory
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: truss-cli-global-config
AWS_REGION: us-east-2
SOURCE_DIR: bootstrap-templates
DEST_DIR: bootstrap-templates
14 changes: 7 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.21"

- name: Go test
run: go test ./cmd/ ./truss/ -timeout 15000ms
- name: Go test
run: go test ./cmd/ ./truss/ -timeout 15000ms
38 changes: 19 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Release
# Controls when the action will run. Triggers the workflow on push or pull request
on:
push:
tags: ['*']
tags: ["*"]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -16,24 +16,24 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Unshallow required for goreleaser's changelog behavior
- name: Unshallow
run: git fetch --prune --unshallow
# Unshallow required for goreleaser's changelog behavior
- name: Unshallow
run: git fetch --prune --unshallow

# Go get'em!
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
# Go get'em!
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.21"

# Release the thing!
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.INSTRUCTURE_BRIDGE_GITHUB_BOT_REPO_RW }}
# Release the thing!
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: "1.23"
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.INSTRUCTURE_BRIDGE_GITHUB_BOT_REPO_RW }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
vendor/

dist/
.envrc
.env

# Secrets
/secrets
Expand Down
60 changes: 35 additions & 25 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,54 @@ before:
hooks:
- go mod download
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
ldflags:
- -X github.com/get-bridge/truss-cli/cmd.Version={{.Version}}
binary: truss
goos:
- darwin
- linux
goarch:
- amd64
- arm64
- env:
- CGO_ENABLED=0
ldflags:
- -X github.com/get-bridge/truss-cli/cmd.Version={{.Version}}
binary: truss
goos:
- darwin
- linux
goarch:
- amd64
- arm64

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
arm64: arm64
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"

snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
brews:
-
name: truss-cli
- name: truss-cli
description: CLI to help manage many k8s clusters
homepage: https://github.com/get-bridge/truss-cli
tap:
owner: get-bridge
repository:
name: homebrew-tap
owner: get-bridge
folder: Formula
dependencies:
- name: kubectl
Expand Down

0 comments on commit 58205c0

Please sign in to comment.