Skip to content
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

Update dependencies and tools #99

Merged
merged 11 commits into from
Nov 4, 2024
22 changes: 11 additions & 11 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,38 @@ permissions:
pull-requests: read

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
qa:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Git Crypt
run: sudo apt-get install -y git-crypt
- name: Setup Golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: '^1.19.1'
go-version: "^1.23.2"
- name: Fix file permissions
run: sudo chmod 0755 internal/arch/file/expect/test/permissions/0755.txt
- name: Lint Go files
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: v1.61.0
args: -v --color=always --config=.rules/.golangci.yml ./...
- name: Run tests
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
- name: Build binaries
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '1.11.2'
args: release --debug --snapshot --rm-dist
version: "2.4.1"
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO_VERSION: '1.19.1'
GO_VERSION: "1.23.2"
36 changes: 18 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,53 @@ name: tag
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+"

permissions:
contents: write

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
release:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Setup Git Crypt
run: sudo apt-get install -y git-crypt
- name: Setup Golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: '^1.19.1'
go-version: "^1.23.2"
- name: Fix file permissions
run: sudo chmod 0755 internal/arch/file/expect/test/permissions/0755.txt
- name: Lint Go files
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: v1.61.0
args: -v --color=always --config=.rules/.golangci.yml ./...
- name: Run tests
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
- name: Run GoReleaser for pre-release
if: ${{ contains(github.ref_name, '-') }}
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '1.11.2'
args: release --debug --rm-dist
version: "2.4.1"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GO_VERSION: '1.19.1'
GO_VERSION: "1.23.2"
- name: Log in to Docker Hub
if: ${{ !contains(github.ref_name, '-') }}
uses: docker/login-action@v2
Expand All @@ -59,11 +59,11 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Run GoReleaser for release
if: ${{ !contains(github.ref_name, '-') }}
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '1.11.2'
args: release --debug --rm-dist --release-notes=.changes/${{ github.ref_name }}.md
version: "2.4.1"
args: release --clean --release-notes=.changes/${{ github.ref_name }}.md
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GO_VERSION: '1.19.1'
GO_VERSION: "1.23.2"
97 changes: 74 additions & 23 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/goreleaser/goreleaser/v2.3.2/www/docs/static/schema.json

version: 2
project_name: goarkitect
before:
hooks:
Expand All @@ -7,51 +9,100 @@ builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}} -X main.gitCommit={{.Commit}} -X main.buildTime={{.Date}} -X main.goVersion={{.Env.GO_VERSION}} -X main.osArch={{.Arch}}
- -s -w
- -X main.version={{ .Version }}
- -X main.gitCommit={{ .Commit }}
- -X main.buildTime={{ .Date }}
- -X main.goVersion={{ .Env.GO_VERSION }}
- -X main.osArch={{ .Arch }}
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}"
checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ .Branch }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
release:
github:
owner: omissis
name: goarkitect
name_template: '{{ .Tag }}'
name_template: "{{ .Tag }}"
prerelease: auto
brews:
- name: goarkitect
tap:
repository:
owner: omissis
name: homebrew-goarkitect
skip_upload: auto
folder: Formula
homepage: 'https://gihub.com/omissis/goarkitect'
description: 'Goarkitect binary'
directory: Formula
homepage: "https://gihub.com/omissis/goarkitect"
description: "Goarkitect binary"
test: |
system "#{bin}/goarkitect"
install: |
bin.install 'goarkitect'
dockers:
- skip_push: auto
- image_templates:
- "omissis/goarkitect:latest-amd64"
- "omissis/goarkitect:{{ .Version }}-amd64"
- "omissis/goarkitect:{{ .Major }}.{{ .Minor }}-amd64"
- "omissis/goarkitect:{{ .Major }}-amd64"
dockerfile: Dockerfile
build_flag_templates:
- "--target=goreleaser"
- "--pull"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
skip_push: auto
- image_templates:
- "omissis/goarkitect:latest-arm64"
- "omissis/goarkitect:{{ .Version }}-arm64"
- "omissis/goarkitect:{{ .Major }}.{{ .Minor }}-arm64"
- "omissis/goarkitect:{{ .Major }}-arm64"
goarch: arm64
dockerfile: Dockerfile
build_flag_templates:
- "--target=goreleaser"
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
skip_push: auto
docker_manifests:
- name_template: "omissis/goarkitect:latest"
image_templates:
- "omissis/goarkitect:latest-amd64"
- "omissis/goarkitect:latest-arm64"
skip_push: auto
- name_template: "omissis/goarkitect:{{ .Version }}"
image_templates:
- "omissis/goarkitect:{{ .Version }}-amd64"
- "omissis/goarkitect:{{ .Version }}-arm64"
skip_push: auto
- name_template: "omissis/goarkitect:{{ .Major }}.{{ .Minor }}"
image_templates:
- "omissis/goarkitect:{{ .Major }}.{{ .Minor }}-amd64"
- "omissis/goarkitect:{{ .Major }}.{{ .Minor }}-arm64"
skip_push: auto
- name_template: "omissis/goarkitect:{{ .Major }}"
image_templates:
- "omissis/goarkitect:latest"
- "omissis/goarkitect:v{{ .Major }}"
- "omissis/goarkitect:v{{ .Major }}.{{ .Minor }}"
- "omissis/goarkitect:{{ .Tag }}"
- "omissis/goarkitect:{{ .Major }}-amd64"
- "omissis/goarkitect:{{ .Major }}-arm64"
skip_push: auto
Loading
Loading