Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
tags:
- "v*.*.*"

jobs:
goreleaser:
runs-on: macos-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- run: git fetch --force --tags
- run: brew install mingw-w64
- working-directory: /tmp
run: |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20230427/llvm-mingw-20230427-ucrt-macos-universal.tar.xz
gunzip llvm-mingw-20230427-ucrt-macos-universal.tar.xz
tar xf llvm-mingw-20230427-ucrt-macos-universal.tar
- uses: actions/setup-go@v3
with:
go-version: '>=1.19.1'
cache: true
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
project_name: irestore
builds:
- id: darwin-build
main: ./cmd/irestore
env:
- CGO_ENABLED=1
goos:
- darwin
- id: windows-build-amd64
main: ./cmd/irestore
ldflags: -buildmode=exe
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
- id: windows-build-arm64
main: ./cmd/irestore
ldflags: -buildmode=exe
env:
- CGO_ENABLED=1
- CC=/tmp/llvm-mingw-20230427-ucrt-macos-universal/bin/aarch64-w64-mingw32-gcc
- CXX=/tmp/llvm-mingw-20230427-ucrt-macos-universal/bin/aarch64-w64-mingw32-g++
goos:
- windows
goarch:
- arm64
- id: windows-build-386
main: ./cmd/irestore
ldflags: -buildmode=exe
env:
- CGO_ENABLED=1
- CC=i686-w64-mingw32-gcc
- CXX=i686-w64-mingw32-g++
goos:
- windows
goarch:
- 386

checksum:
name_template: 'checksums.txt'