Skip to content

Merge pull request #49 from steffenfritz/44-change-use-generic-path-o… #31

Merge pull request #49 from steffenfritz/44-change-use-generic-path-o…

Merge pull request #49 from steffenfritz/44-change-use-generic-path-o… #31

Workflow file for this run

name: crossbuild
on:
push:
tags:
- '*'
#pull_request:
jobs:
xgo:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
name: Build ftrove
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: 1.21
dest: build
prefix: ftrove
targets: windows/amd64,linux/amd64,linux/arm64,darwin/arm64
v: true
x: true
race: false
ldflags: -s -w
buildmode: default
trimpath: true
pkg: ./cmd/ftrove
-
name: Build admftrove
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: 1.21
dest: build
prefix: admftrove
targets: windows/amd64,linux/amd64,linux/arm64,darwin/arm64
v: true
x: true
race: false
ldflags: -s -w
buildmode: default
trimpath: true
pkg: ./cmd/admftrove
-
name: Create Release
uses: actions/[email protected]
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
-
name: Upload Release Assets
uses: glentiki/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
assets_path: ./build