diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..a399bc81 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }}" +