arc-custom/.github/workflows/build.yml
AuxXxilium 9663054d83 build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-10-19 15:12:30 +02:00

72 lines
1.8 KiB
YAML

name: Build Custom
on:
workflow_dispatch:
inputs:
version:
description: "version"
required: false
type: string
latest:
description: "latest"
default: true
type: boolean
prerelease:
description: "pre release"
default: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Changelog
uses: Bullrich/generate-release-changelog@master
id: Changelog
env:
REPO: ${{ github.repository }}
- name: Init Env
run: |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
- name: Calculate version
run: |
# Calculate Version
VERSION=""
if [ -n "${{ inputs.version }}" ]; then
VERSION="${{ inputs.version }}"
else
VERSION="`date +'%y.%m.%d'`"
fi
if [ -n "${VERSION}" ]; then
# Modify Source File
echo "Version: ${VERSION}"
echo "${VERSION}" >VERSION
echo "VERSION=${VERSION}" >> $GITHUB_ENV
fi
- name: Build Patches Package
run: |
zip -9j custom-${{ env.VERSION }}.zip *.tgz *.gz VERSION
- name: Release
if: success() && env.VERSION != ''
uses: ncipollo/release-action@v1
with:
tag: ${{ env.VERSION }}
makeLatest: ${{ inputs.latest }}
prerelease: ${{ inputs.prerelease }}
allowUpdates: true
body: |
${{ steps.Changelog.outputs.changelog }}
artifacts: |
custom-*.zip