Skip to content

Build wikilite

Build wikilite #4

Workflow file for this run

name: Build wikilite
on:
release:
types: [published]
jobs:
build-macos-amd64:
name: Build for MacOS AMD64
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.4'
- name: Build wikilite for MacOS AMD64
run: |
CC=clang \
CGO_ENABLED=1 \
GOOS=darwin \
GOARCH=amd64 \
go build -tags=fts5 -ldflags="-s -w" -o wikilite .
- name: Compress artifact
run: tar -czvf wikilite-macos-amd64.tar.gz wikilite
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: wikilite-macos-amd64.tar.gz
asset_name: wikilite-macos-amd64.tar.gz
asset_content_type: application/octet-stream
build-macos-arm64:
name: Build for MacOS ARM64
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.4'
- name: Build wikilite for MacOS ARM64
run: |
CC=clang \
CGO_ENABLED=1 \
GOOS=darwin \
GOARCH=arm64 \
go build -tags=fts5 -ldflags="-s -w" -o wikilite .
- name: Compress artifact
run: tar -czvf wikilite-macos-arm64.tar.gz wikilite
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: wikilite-macos-arm64.tar.gz
asset_name: wikilite-macos-arm64.tar.gz
asset_content_type: application/octet-stream
build-linux-amd64:
name: Build for Linux AMD64
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.4'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y gcc
- name: Build wikilite for Linux AMD64
run: |
CC=gcc \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=amd64 \
go build -tags=fts5 -ldflags="-s -w -extldflags '-static'" -o wikilite .
- name: Compress artifact
run: tar -czvf wikilite-linux-amd64.tar.gz wikilite
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: wikilite-linux-amd64.tar.gz
asset_name: wikilite-linux-amd64.tar.gz
asset_content_type: application/octet-stream
build-linux-arm64:
name: Build for Linux ARM64
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.4'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Build wikilite for Linux ARM64
run: |
CC=aarch64-linux-gnu-gcc \
CXX=aarch64-linux-gnu-g++ \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=arm64 \
go build -tags=fts5 -ldflags="-s -w -extldflags '-static'" -o wikilite .
- name: Compress artifact
run: tar -czvf wikilite-linux-arm64.tar.gz wikilite
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: wikilite-linux-arm64.tar.gz
asset_name: wikilite-linux-arm64.tar.gz
asset_content_type: application/octet-stream
build-windows-amd64:
name: Build for Windows AMD64
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.4'
- name: Install dependencies
run: choco install mingw -y
- name: Build wikilite for Windows AMD64
run: |
$env:CGO_ENABLED = "1";
$env:GOOS = "windows";
$env:GOARCH = "amd64";
go build -tags=fts5 -ldflags="-s -w" -o wikilite.exe .
- name: Compress artifact
run: Compress-Archive -Path wikilite.exe -DestinationPath wikilite-windows-amd64.zip
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: wikilite-windows-amd64.zip
asset_name: wikilite-windows-amd64.zip
asset_content_type: application/octet-stream
build-windows-arm64:
name: Build for Windows ARM64
runs-on: windows-arm64
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.4'
- name: Build wikilite for Windows ARM64
run: |
$env:CGO_ENABLED = "1";
$env:GOOS = "windows";
$env:GOARCH = "arm64";
go build -tags=fts5 -ldflags="-s -w" -o wikilite.exe .
- name: Compress artifact
run: Compress-Archive -Path wikilite.exe -DestinationPath wikilite-windows-arm64.zip
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: wikilite-windows-arm64.zip
asset_name: wikilite-windows-arm64.zip
asset_content_type: application/octet-stream