mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-08-26 10:56:33 +00:00
Build Snapshot Release / build (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled
Build Snapshot Release / Windows installers (push) Has been cancelled
Update Restic / update-restic-version (push) Has been cancelled
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
# This workflow will build a golang project
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
|
|
|
name: Build Snapshot Release
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "*.md"
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "*.md"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.24"
|
|
|
|
- name: Setup NodeJS
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- name: Build
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --snapshot --clean
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: backrest-snapshot-builds
|
|
path: |
|
|
dist/*.tar.gz
|
|
dist/*.zip
|
|
|
|
installer:
|
|
name: Windows installers
|
|
needs: [ build ]
|
|
runs-on: windows-2022
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download build artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: backrest-snapshot-builds
|
|
|
|
- name: Unzip artifacts and compile Inno Setup installers
|
|
shell: powershell
|
|
run: |
|
|
mkdir windows_installers
|
|
foreach ($arch in "x86_64", "arm64") {
|
|
$src = "backrest_Windows_$arch"
|
|
Expand-Archive ".\${src}.zip"
|
|
cp build\windows\* $src
|
|
& "c:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DArch=$arch ${src}\installer.iss
|
|
cp "$src\Output\*" windows_installers
|
|
}
|
|
|
|
- name: Upload installers
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: backrest-snapshot-installers
|
|
path: windows_installers\*.exe
|