From f2c943d9e0f9a82fb497d5fa9eba7a625578cb42 Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Sun, 23 Feb 2025 15:02:42 -0700 Subject: [PATCH] ci: update release workflow --- .github/workflows/release.yml | 112 +++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a399bc81..422b5456 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,7 +128,7 @@ jobs: fetch-depth: 0 # # - # Get version from package.json VERSION value + # Initialize › Get version from package.json VERSION value # # - name: "👁️‍🗨️ Package Version › Set" @@ -142,3 +142,113 @@ jobs: run: | echo "VERSION: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}" + # # + # Job › Release › Github + # # + + job-release: + name: >- + 📦 Publish › Release + runs-on: ubuntu-latest + needs: [ job-initialize ] + env: + PACKAGE_VERSION: ${{ needs.job-initialize.outputs.package_version }} + outputs: + guid: ${{ steps.task_release_dotenv_get.outputs.GUID }} + uuid: ${{ steps.task_release_dotenv_get.outputs.UUID }} + permissions: + contents: write + packages: write + steps: + + # # + # Release › Checkout + # # + + - name: "☑️ Checkout" + id: task_release_checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # # + # Release › Set Env Variables + # # + + - name: >- + 🕛 Get Timestamp + id: task_release_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 + + # # + # Release › Print Version Debug + # # + + - name: "🪪 Test Next Job Version" + id: task_release_debug_print_ver + run: | + echo "VERSION: ${{ env.PACKAGE_VERSION }}" + + # # + # Release › Install package via NPM + # # + + - name: "🪪 NPM › Install" + id: task_release_npm_install + run: | + cd ./tvapp2 + npm install + env: + NODE_AUTH_TOKEN: ${{ secrets.SELF_TOKEN_CL }} + + # # + # Release › Print / Lint + # # + + - name: "🪪 NPM › Lint" + id: task_release_npm_prettylint + run: | + npm run lint + + # # + # Release › Build + # # + + - name: "📦 NPM › Build" + id: task_release_npm_build + run: | + npm run build + + # # + # Release › Execute npm generate so that a uuid and guid can be created + # # + + - name: "🪪 Generate IDs" + id: task_release_npm_env_generate + run: | + npm run root:generate + + # # + # .ENV › Get + # Get guid and uuid from env variable generated by npm + # # + + - name: "🪪 .ENV › Get" + id: task_release_dotenv_get + uses: falti/dotenv-action@v1 + + # # + # .ENV › Print (Debug) + # Show guid and uuid from env variable generated by npm + # # + + - name: "🪪 .ENV › Read" + id: task_dotenv_debug_print + run: | + echo "GUID: ${{ steps.task_release_dotenv_get.outputs.GUID }}" + echo "UUID: ${{ steps.task_release_dotenv_get.outputs.UUID }}" +