Skip to content

fix artifacts

fix artifacts #12

Workflow file for this run

name: Create Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Tag Name
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
go install github.com/swaggo/swag/cmd/swag@latest
swag init
env GOOS=darwin GOARCH=arm64 go build -ldflags "-w -s" -o logicng-service-macos-arm main.go
env GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" -o logicng-service-macos-intel main.go
env GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o logicng-service-linux-amd64 main.go
env GOOS=linux GOARCH=arm64 go build -ldflags "-w -s" -o logicng-service-linux-arm64 main.go
env GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o logicng-service-win.exe main.go
- name: Build and Push AMD64 Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/booleworks/logicng-service:${{ ENV.TAG_NAME }}
platforms: linux/amd64
build-args: PLATFORM=linux-amd64
- name: Build and Push ARM64 Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/booleworks/logicng-service:${{ ENV.TAG_NAME }}
platforms: linux/arm64
build-args: PLATFORM=linux-arm64
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
logicng-service-macos-arm
logicng-service-macos-intel
logicng-service-linux-arm64
logicng-service-linux-amd64
logicng-service-win.exe