Skip to content

Commit

Permalink
change release
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-tatarski committed Dec 30, 2023
1 parent 67eaff3 commit 77c5b08
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 27 deletions.
45 changes: 18 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,30 @@ on:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"
permissions:
contents: write
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- name: Set release name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: "Build for linux"
run: make release-lin
- name: "Build for windows"
run: make release-win
- name: "Build for macos"
run: "make release-mac"
- name: "Clean"
run: "make clean"
- uses: ncipollo/release-action@v1
with:
artifacts: "build/*"
jobs:

build_and_push_image:
name: Build and Push Docker image to Docker Hub
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build Tag and push
run: "make release-docker"
- uses: actions/setup-go@v4
with:
go-version: stable
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GH_TOKEN }}
38 changes: 38 additions & 0 deletions .goreleaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
builds:
- binary: framed
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
flags:
- -mod=vendor

release:
prerelease: auto

dockers:
image_templates:
- "mactat/framed:latest"
- "mactat/framed:{{ .Tag }}"
dockerfile: "dockerfiles/dockerfile"

universal_binaries:
- replace: true

brews:
- name: framed
homepage: "https://github.com/mactat/framed"
tap:
owner: mactat
name: homebrew-mactat
commit_author:
name: mactat
email: maciektatarsk@gmail.com

checksum:
name_template: 'checksums.txt'

0 comments on commit 77c5b08

Please sign in to comment.