45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Build and Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: codeberg-small
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 'stable'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y chafa libglib2.0-dev
|
|
|
|
- name: Build binary
|
|
run: make build
|
|
|
|
- name: Test binary
|
|
run: ./gogofetch -h
|
|
|
|
- name: Package release artifact
|
|
run: |
|
|
tar -czvf gogofetch-${{ github.ref_name }}-linux-amd64.tar.gz gogofetch Makefile logos/
|
|
|
|
- name: Create Release and Upload Asset
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITEA_URL: ${{ github.server_url }}
|
|
run: |
|
|
gitea release create \
|
|
--repo "${{ github.repository }}" \
|
|
--tag "${{ github.ref_name }}" \
|
|
--title "Release ${{ github.ref_name }}" \
|
|
--note "Automated binary release for Arch Linux AUR" \
|
|
--asset "gogofetch-${{ github.ref_name }}-linux-amd64.tar.gz" |