Skip to content

Commit

Permalink
ci: refactor release process using goreleaser
Browse files Browse the repository at this point in the history
Signed-off-by: deggja <danieldagfinrud@gmail.com>
  • Loading branch information
deggja committed Oct 4, 2024
1 parent 93e8cf6 commit e16f577
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 64 deletions.
41 changes: 0 additions & 41 deletions .github/scripts/bump_version.sh

This file was deleted.

28 changes: 5 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
name: Release

on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
environment:
description: 'Environment'
required: false
push:
branches:
- main
paths:
- 'backend/**'
- 'frontend/**'
tags:
- 'v*.*.*'

jobs:
build-and-release:
name: Build and Release
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

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

Expand All @@ -37,14 +25,8 @@ jobs:
cd backend
go mod tidy
- name: Bump version and tag
id: bump_version
run: |
chmod +x .github/scripts/bump_version.sh
.github/scripts/bump_version.sh
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
Expand Down
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ archives:
format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
before:
hooks:
- go mod tidy

# Release Configuration
release:
Expand Down

0 comments on commit e16f577

Please sign in to comment.