automidically/.forgejo/workflows/Build Automidically.yml
Renovate[BOT] 40beecc064 chore(deps): update https://git.auengun.net/homelab/action-common-setup action to v1.6.0 (#69) [skip-ci]
Reviewed-on: #69
Co-authored-by: Renovate[BOT] <renovate-bot@auengun.net>
Co-committed-by: Renovate[BOT] <renovate-bot@auengun.net>
2025-12-04 02:58:38 +00:00

68 lines
2 KiB
YAML

# git.auengun.net/GregoryDosh/automidically
# Copyright (C) 2020 GregoryDosh
---
name: Build Automidically
on:
push:
branches:
- main
paths:
- .version
jobs:
build-automidically:
name: Build Automidically
runs-on: ubuntu-act-latest
if: secrets.REPO_PUBLISH_TOKEN != ''
steps:
- name: Clone Repo into Workspace
uses: https://git.auengun.net/homelab/action-common-setup@e34d0afb02ddc413dfad6c4ea8146b60d4566362 # 1.6.0
- name: Create Release Title
run: |
{
printf "RELEASE_TITLE="
cat .version | tr -d '\n'
echo -n "-"
echo -n "${{ github.sha }}" | cut -c1-10
} >> "$GITHUB_ENV"
echo $GITHUB_ENV
cat $GITHUB_ENV
- name: Build Automidically
id: make_build
shell: bash
run: |
make build
- name: Create Release Notes
run: |
git fetch -t
{
printf "RELEASE_NOTES<<EOF"
echo ""
cat CHANGELOG.md | tail +2 | sed -n "/## $(git describe --abbrev=0 --tags `git rev-list --tags --max-count=1` | cut -f1 -d'-')/q;p"
echo ""
echo "---"
echo ""
echo "**sha256** \`$(cat release/automidically.sha256)\`"
echo ""
echo "EOF"
} >> "$GITHUB_ENV"
echo $GITHUB_ENV
cat $GITHUB_ENV
- name: Create Release
if: ${{ success() && github.ref == 'refs/heads/main' }}
uses: https://git.auengun.net/actions/forgejo-release@fc0488c944626f9265d87fbc4dd6c08f78014c63 # v2.7.3
with:
direction: upload
url: https://git.auengun.net
release-dir: release
tag: "${{ env.RELEASE_TITLE }}"
title: "${{ env.RELEASE_TITLE }}"
token: "${{ secrets.REPO_PUBLISH_TOKEN }}"
release-notes: "${{ env.RELEASE_NOTES }}"
override: true
hide-archive-link: true