summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-11-13 13:54:51 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2023-11-13 14:01:32 +0100
commiteae10426cd805ecc0a0459b61639e48e6cd913ad (patch)
tree101267bf661c4aab812eae275be57ffe202a5bbf /.github/workflows
parent72f83468299f2510ada7bb2afdc2ca841127fd24 (diff)
Enable cgo compilation in goreleaser (#7)v0.4.1
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release.yaml32
1 files changed, 20 insertions, 12 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 3b95fba..19b0e7c 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -8,6 +8,11 @@ on:
permissions:
contents: write
+env:
+ GO_VERSION: '1.21.4'
+ PKG_NAME: 'github.com/philippta/flyscrape'
+ DOCKER_IMG: ghcr.io/goreleaser/goreleaser-cross
+
jobs:
release:
name: Release
@@ -17,16 +22,19 @@ jobs:
with:
fetch-depth: 0
- - run: git fetch --force --tags
-
- - uses: actions/setup-go@v4
- with:
- go-version: "1.21.3"
+ - name: Fetch Git tags
+ run: git fetch --force --tags
- - uses: goreleaser/goreleaser-action@v5
- with:
- distribution: goreleaser
- version: latest
- args: release --clean
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Build and Release
+ run: |
+ docker run \
+ --rm \
+ --privileged \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ -v $(pwd)/sysroot:/sysroot \
+ -v $(pwd):/go/src/${PKG_NAME} \
+ -w /go/src/${PKG_NAME} \
+ -e CGO_ENABLED=1 \
+ -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
+ ghcr.io/goreleaser/goreleaser-cross:v${GO_VERSION} \
+ release --clean