Files
plainleaf/.github/workflows/edge.yml
T

62 lines
1.8 KiB
YAML

name: Build & Release Edge
on:
push:
branches:
- "main"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.25.1"
- name: Install dependencies
run: npm ci
- name: Compile frontend and plug-compile
run: |
npm run build
npm run build:plug-compile
- name: Build Go binaries for multiple platforms
run: |
# Linux ARM64
GOOS=linux GOARCH=arm64 go build -o silverbullet .
zip silverbullet-server-linux-aarch64.zip silverbullet
# Linux x86_64
GOOS=linux GOARCH=amd64 go build -o silverbullet .
zip silverbullet-server-linux-x86_64.zip silverbullet
# macOS ARM64
GOOS=darwin GOARCH=arm64 go build -o silverbullet .
zip silverbullet-server-darwin-aarch64.zip silverbullet
# macOS x86_64
GOOS=darwin GOARCH=amd64 go build -o silverbullet .
zip silverbullet-server-darwin-x86_64.zip silverbullet
# Windows x86_64
GOOS=windows GOARCH=amd64 go build -o silverbullet.exe .
zip silverbullet-server-windows-x86_64.zip silverbullet.exe
- name: Update edge release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
tag_name: edge
body: Automated build from commit ${{ github.sha }}
prerelease: true
files: |
website/CHANGELOG.md
dist/plug-compile.js
silverbullet-*.zip