Skip to content

Commit

Permalink
ci: release and ci changes, mainly for aws bootstrap zip
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksasiriski committed Aug 26, 2024
1 parent 4cff3eb commit dd45253
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 112 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
93 changes: 0 additions & 93 deletions .github/workflows/cd.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/ci_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,3 @@ jobs:
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
env:
HEARCHCO_CLI: true
4 changes: 2 additions & 2 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

services:
redis:
image: redis
image: docker.io/library/redis:latest
ports:
- 6379:6379
options: >-
Expand All @@ -50,7 +50,7 @@ jobs:
--health-timeout 5s
--health-retries 5
dynamodb:
image: amazon/dynamodb-local
image: docker.io/amazon/dynamodb-local:latest
ports:
- 8000:8000
options: >-
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
push:
tags: ["v*.*.*"]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
issues: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate go code from go:generate comments
run: make install

- name: Release
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean --config goreleaser/release.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Artifact Linux
uses: actions/upload-artifact@v4
with:
name: build_linux
path: dist/*linux*
17 changes: 5 additions & 12 deletions goreleaser/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- darwin
- freebsd
- windows
main: ./src
goarch:
- amd64
Expand All @@ -20,20 +17,16 @@ builds:
- -X "main.Timestamp={{ .Timestamp }}"
flags:
- -trimpath
ignore:
- goos: freebsd
goarch: arm64
- goos: windows
goarch: arm64

# MacOS Universal Binaries
universal_binaries:
- replace: true

# Archive
archives:
- name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format: "binary"
- id: "aws"
name_template: "{{ .ProjectName }}_bootstrap_aws_{{ .Arch }}"
format: "zip"
files:
- none*

# Checksum
checksum:
Expand Down

0 comments on commit dd45253

Please sign in to comment.