chore: update readme #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build go binaries | |
on: push | |
jobs: | |
build-stamusctl: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
include: | |
- { runner: ubuntu-latest, os: linux, arch: amd64, go-version: 1.22 } | |
# - { runner: macos-latest, os: darwin, arch: amd64, go-version: 1.22 } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build | |
run: make cli && mv dist/stamusctl dist/stamusctl-${{matrix.os}}-${{matrix.arch}} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: stamusctl-${{matrix.os}}-${{matrix.arch}} | |
path: dist/* | |
build-stamusdaemon: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
include: | |
- { runner: ubuntu-latest, os: linux, arch: amd64, go-version: 1.22 } | |
# - { runner: macos-latest, os: darwin, arch: amd64, go-version: 1.22 } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build | |
run: make daemon && mv dist/stamusd dist/stamusd-${{matrix.os}}-${{matrix.arch}} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: stamusd-${{matrix.os}}-${{matrix.arch}} | |
path: dist/* | |
create-tag: | |
runs-on: ${{ matrix.runner }} | |
needs: [build-stamusctl, build-stamusdaemon] | |
strategy: | |
matrix: | |
include: | |
- { runner: ubuntu-latest, os: linux, arch: amd64, go-version: 1.22 } | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: get tag version | |
id: get_tag_version | |
run: | | |
cat VERSION | |
echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT | |
- name: Download stamusctl | |
uses: actions/download-artifact@v4 | |
with: | |
name: stamusctl-${{matrix.os}}-${{matrix.arch}} | |
- name: Download stamusd | |
uses: actions/download-artifact@v4 | |
with: | |
name: stamusd-${{matrix.os}}-${{matrix.arch}} | |
- name: Release snapshot | |
id: release-snapshot | |
uses: softprops/action-gh-release@v2 | |
if: github.ref == 'refs/heads/main' | |
with: | |
tag_name: ${{ steps.get_tag_version.outputs.version }} | |
draft: false | |
prerelease: false | |
files: | | |
stamusctl-${{matrix.os}}-${{matrix.arch}} | |
stamusd-${{matrix.os}}-${{matrix.arch}} |