Skip to content

Release builds

Release builds #4

Workflow file for this run

name: Release builds
on:
push:
branches:
- config-watch
tags:
- 'v*.*.*'
workflow_dispatch:
permissions:
contents: write
jobs:
bump:
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
uses: smpl-os/.github/.github/workflows/auto-release.yml@main
with:
version-file: git-tag
branch: config-watch
secrets: inherit
release:
needs: bump
if: always() && (needs.bump.result == 'success' && needs.bump.outputs.skipped != 'true' || startsWith(github.ref, 'refs/tags/'))
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
cache-dependency-path: go.sum
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ needs.bump.outputs.sha || github.ref }}
- name: Build (optimized for smplOS)
run: |
make generate
make build-release
VERSION="$(go run tools/build-version.go)"
mkdir -p "micro-$VERSION"
cp micro LICENSE README.md LICENSE-THIRD-PARTY \
assets/packaging/micro.1 assets/packaging/micro.desktop \
"micro-$VERSION/"
tar -czf "micro-$VERSION-linux64.tar.gz" "micro-$VERSION"
sha256sum "micro-$VERSION-linux64.tar.gz" > "micro-$VERSION-linux64.tar.gz.sha"
mkdir -p binaries
mv "micro-$VERSION-linux64.tar.gz" "micro-$VERSION-linux64.tar.gz.sha" binaries/
- name: Publish
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.bump.outputs.tag || github.ref_name }}
generate_release_notes: true
files: binaries/*
- name: Cleanup
run: rm -rf binaries