ci: add github package deployment workflow

This commit is contained in:
2025-02-23 14:11:30 -07:00
parent 7c0baa0ec1
commit 876ea18dc0

144
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,144 @@
# #
# @type github workflow
# @desc publishes a new release
# @author Aetherinox
# @url https://github.com/Aetherinox
# #
name: "📦 Release Publish"
run-name: "📦 Release Publish"
# #
# Triggers
# #
on:
workflow_dispatch:
inputs:
# #
# Name of the plugin to use when creating the release zip filename
# e.g: tvapp2-v1.0.0.zip
# #
PROJECT_NAME:
description: "📦 Name of App"
required: true
default: 'tvapp2'
type: string
# #
# ENABLE: the changelog generated in releases tab will only display single commits.
# DISABLE: the changelog shows pull requests completed based on their labels
# #
CHANGELOG_MODE_COMMIT:
description: "📑 Use Commits Instead of PRs"
required: true
default: true
type: boolean
# #
# ENABLE: Will show all types of commits, including uncategorized
# DISABLE: WIll only show actions that have been categorized using the format
# type(scope): description
# type: description
# #
SHOW_UNCATEGORIZED:
description: "🗂️ Show Uncategorized Commits"
required: true
default: false
type: boolean
# #
# ENABLE: released version will be marked as pre-release
# DISABLE: release version will be marked as stable / normal release
# #
PRERELEASE:
description: "🧪 Build RC (Pre-release)"
required: true
default: false
type: boolean
# #
# Release Candidate version number
# this will be added to the end of your released app in the releases page.
# e.g: tvapp2-v1.0.0-rc.1
# #
VERSION_RC:
description: "🧪 RC (Pre-release) Ver (tvapp2-rc.v1)"
required: false
type: string
default: "1"
# #
# Jobs
# #
jobs:
# #
# Jobs Initialize
# #
job-initialize:
name: >-
📦 Initialize
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
permissions:
contents: write
packages: write
steps:
# #
# Initialize Start
# #
- name: "✅ Start"
id: task_initialize_start
run: |
echo "Starting build"
# #
# Initialize Set Env Variables
# #
- name: >-
🕛 Get Timestamp
id: task_initialize_label_set_timestamp
run: |
echo "NOW=$(date +'%m-%d-%Y %H:%M:%S')" >> $GITHUB_ENV
echo "NOW_SHORT=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV
# #
# Initialize Checkout
# #
- name: "☑️ Checkout"
id: task_initialize_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# Get version from package.json VERSION value
# #
- name: "👁️‍🗨️ Package Version Set"
id: task_initialize_package_getversion
run: |
VER=$(cat tvapp2/package.json | jq -r '.version')
echo "PACKAGE_VERSION=$VER" >> $GITHUB_OUTPUT
- name: "👁️‍🗨️ Package Version Get"
id: task_initialize_package_version_get
run: |
echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}"