mirror of
https://github.com/AuxXxilium/arc-configs.git
synced 2024-11-23 14:50:52 +07:00
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: Build Configs
|
|
|
|
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
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions: write-all
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@main
|
|
|
|
- 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 Configs Package
|
|
run: |
|
|
# Build Configs Package
|
|
zip -9j configs-${{ env.VERSION }}.zip *.yml VERSION
|
|
|
|
- name: Release Configs
|
|
if: success() && env.VERSION != ''
|
|
uses: ncipollo/release-action@v1.14.0
|
|
with:
|
|
name: ${{ env.VERSION }}
|
|
tag: ${{ env.VERSION }}
|
|
makeLatest: ${{ inputs.latest }}
|
|
prerelease: ${{ inputs.prerelease }}
|
|
allowUpdates: true
|
|
artifacts: |
|
|
configs-*.zip
|