Skip to content

Update 1Password authentication instructions to show both SDK and CLI… #18

Update 1Password authentication instructions to show both SDK and CLI…

Update 1Password authentication instructions to show both SDK and CLI… #18

Workflow file for this run

name: Build Cross-Platform
on:
push:
tags:
- 'v*.*.*' # Only trigger on version tags like v1.0.0
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual trigger
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
name: mremotego-linux-amd64
- os: ubuntu-24.04-arm
goos: linux
goarch: arm64
name: mremotego-linux-arm64
- os: windows-latest
goos: windows
goarch: amd64
name: mremotego-windows-amd64.exe
- os: macos-14
goos: darwin
goarch: arm64
name: mremotego-darwin-arm64
# Commented out - macOS Intel runners are very slow on free tier
# Uncomment if needed, but most Mac users are on Apple Silicon now
# - os: macos-12
# goos: darwin
# goarch: amd64
# name: mremotego-darwin-amd64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
run: |
sudo apt-get update
sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev
- name: Build (Windows)
if: matrix.os == 'windows-latest'
env:
CGO_ENABLED: 1
run: |
go build -ldflags "-H windowsgui" -o ${{ matrix.name }} ./cmd/mremotego-gui
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
env:
CGO_ENABLED: 1
run: |
go build -o ${{ matrix.name }} ./cmd/mremotego-gui
- name: Build (macOS)
if: startsWith(matrix.os, 'macos')
env:
CGO_ENABLED: 1
run: |
go build -o ${{ matrix.name }} ./cmd/mremotego-gui
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.goos }}-${{ matrix.goarch }}
path: ${{ matrix.name }}
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Display structure of downloaded files
run: ls -R artifacts/
- name: Create release archives
run: |
cd artifacts
# Create tar.gz for Linux and macOS
for dir in linux-* darwin-*; do
if [ -d "$dir" ]; then
tar czf "${dir}.tar.gz" -C "$dir" .
fi
done
# Create zip for Windows
for dir in windows-*; do
if [ -d "$dir" ]; then
cd "$dir"
zip -r "../${dir}.zip" .
cd ..
fi
done
ls -lh
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.version.outputs.VERSION }}
draft: false
prerelease: true
generate_release_notes: true
files: |
artifacts/*.tar.gz
artifacts/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}