Skip to content

ci: use goreleaser release --skip-publish instead of build #12

ci: use goreleaser release --skip-publish instead of build

ci: use goreleaser release --skip-publish instead of build #12

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
goreleaser:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
goos: linux
goarch: amd64
pkg_deps: libgtk-3-dev libwebkit2gtk-4.0-dev
# macOS disabled (Wails SDK linker issue on ARM, waiting for runner on Intel)
# - os: macos-13
# goos: darwin
# goarch: amd64
# pkg_deps: ""
# - os: macos-latest
# goos: darwin
# goarch: arm64
# pkg_deps: ""
- os: windows-latest
goos: windows
goarch: amd64
pkg_deps: ""
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install system deps
if: matrix.pkg_deps != ''
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq ${{ matrix.pkg_deps }}
- uses: actions/setup-go@v5
with:
go-version: "1.26"
cache: true
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --single-target --clean --skip-publish --skip-announce --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CGO_ENABLED: 1
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/mdlight_*
release:
needs: goreleaser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: _artifacts
- name: Generate checksums
run: |
find _artifacts -type f -name 'mdlight_*' -exec sha256sum {} \; > checksums.txt
- uses: softprops/action-gh-release@v2
with:
files: |
_artifacts/**/mdlight_*
checksums.txt
draft: false
prerelease: false
generate_release_notes: true