Reviewed-on: #62 Co-authored-by: Renovate[BOT] <renovate-bot@auengun.net> Co-committed-by: Renovate[BOT] <renovate-bot@auengun.net>
68 lines
2 KiB
YAML
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@3e92f643023a84a6b2bdc495a271846c5e98c949 # 1.5.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
|