Files
nexus/.github/workflows/release-builds.yml
T
Andy Dixon b325097602 ci: least-privilege token, SHA-pinned actions, cargo audit job
- ci.yml declares permissions: contents: read instead of the default
  token scope.
- Every action is pinned to the commit its current tag points at
  (checkout v4.4.0, upload-artifact v4.6.2, action-gh-release v2.6.2),
  so a moved tag can't change what runs with release write access.
- A cargo audit job runs on every push; the single ignored advisory
  (RUSTSEC-2023-0071, rsa via russh, no fix available) is recorded with
  its rationale in rust/.cargo/audit.toml (SEC-20261012-019, -012).

Release signing and macOS notarisation are not part of this change.
2026-10-12 09:19:57 +01:00

67 lines
2.4 KiB
YAML

name: Release Builds
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- { platform: darwin/amd64, runner: macos-13 }
- { platform: darwin/arm64, runner: macos-14 }
- { platform: linux/amd64, runner: ubuntu-22.04 }
- { platform: linux/arm64, runner: ubuntu-22.04-arm }
- { platform: windows/amd64, runner: windows-latest }
- { platform: windows/arm64, runner: windows-11-arm }
defaults:
run:
shell: bash
working-directory: rust
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
- name: Rust toolchain (pinned by rust-toolchain.toml)
run: rustup show active-toolchain || rustup toolchain install
- name: Linux build dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libxkbcommon-dev libgl1-mesa-dev libx11-dev libxcursor-dev libxrandr-dev libxi-dev libwayland-dev libgtk-3-dev zip
- name: Test
run: cargo test --locked --workspace
- name: Build and package
env:
NEXUS_RELEASE_TARGETS: ${{ matrix.platform }}
NEXUS_RELEASE_ROOT: ${{ github.workspace }}/build/releases
run: ./release.sh
- name: Upload artefacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nexus-terminal-${{ matrix.runner }}
path: |
build/releases/*/NexusTerminal-*.zip
build/releases/manifest-*.json
build/releases/version-*.txt
- name: Attach to GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
files: build/releases/*/NexusTerminal-*.zip