Skip to content

Commit

Permalink
ci: update workflow dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Apr 27, 2024
1 parent 90ee6c8 commit b17ea12
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 41 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ jobs:
name: Orion

steps:
- name: "Checkout"
- name: "☑️ Checkout"
uses: actions/checkout@v4

- name: "Setup Python"
- name: "🐍 Setup Python"
id: task_build_python_setup
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: "Build Documentation"
- name: >-
📕 Build Documentation
id: task_build_docs
run: |
export DOCS_NAME=${{ secrets.DOCS_NAME }}
export DOCS_SECRET_L1=${{ secrets.DOCS_SECRET_L1 }}
Expand All @@ -69,10 +72,10 @@ jobs:
mkdocs build
dir
env:
# Note: It is not the same as ${{ secrets.ADMINSERV_TOKEN }} !
GH_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
- name: Deploy
- name: "💽 Deploy"
id: task_build_deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ADMINSERV_TOKEN_CL }}
Expand Down
82 changes: 46 additions & 36 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
id: task_release_checkout
with:
fetch-depth: 0

- name: Use Node.js
- name: "⚙️ Use Node.js"
id: task_release_node_setup
uses: actions/setup-node@v4
id: checkout
with:
node-version: "20.x"
registry-url: https://npm.pkg.github.com/
Expand All @@ -107,16 +108,21 @@ jobs:
# Get version from package.json VERSION value
# ---------------------------------------------------------------------------------------

- name: Get Package Version
id: get_package_version
- name: "👁️‍🗨️ Package Version › Set"
id: task_release_package_version_set
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV

- name: "👁️‍🗨️ Package Version › Get"
id: task_release_package_version_get
run: |
echo "VERSION: ${{ env.PACKAGE_VERSION }}"
# ---------------------------------------------------------------------------------------
# Build Project & Create Zip
# ---------------------------------------------------------------------------------------

- name: "🔨 Build › Stable ( ${{ inputs.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip )"
id: build-st
id: task_release_build_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: |
echo Building STABLE Package .zip PACKAGE_VERSION
Expand All @@ -128,7 +134,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}

- name: "🔨 Build › Release Candidate ( ${{ inputs.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip )"
id: build-rc
id: task_release_build_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: |
echo Building PRE-RELEASE Package .zip PACKAGE_VERSION
Expand All @@ -145,14 +151,14 @@ jobs:
# ---------------------------------------------------------------------------------------

- name: "🪪 .ENV › Get"
id: dotenv
id: task_release_dotenv
uses: falti/dotenv-action@v1

- name: "🪪 .ENV › Read"
id: dotenv-output
id: task_release_dotenv_print
run: |
echo "GUID: ${{ steps.dotenv.outputs.GUID }}"
echo "UUID: ${{ steps.dotenv.outputs.UUID }}"
echo "GUID: ${{ steps.task_release_dotenv.outputs.GUID }}"
echo "UUID: ${{ steps.task_release_dotenv.outputs.UUID }}"
# ---------------------------------------------------------------------------------------
# [ Tag ]: Pre Create
Expand All @@ -164,7 +170,7 @@ jobs:

- name: "🔖 Tag › Pre Create ${{ env.PACKAGE_VERSION }}"
uses: rickstaa/action-create-tag@v1
id: "tag_create"
id: task_release_tag
with:
tag: ${{ env.PACKAGE_VERSION }}
tag_exists_error: false
Expand All @@ -179,14 +185,14 @@ jobs:
- name: "🔖 Tag › Confirm ${{ env.PACKAGE_VERSION }}"
run: |
echo "Tag already present: ${{ env.TAG_EXISTS }}"
echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}"
echo "Tag already present: ${{ steps.task_release_tag.outputs.tag_exists }}"
# ---------------------------------------------------------------------------------------
# [ Release Candidate ]: Checksum
# ---------------------------------------------------------------------------------------

- name: "🆔 Checksum › Stable"
id: checksum-st
id: task_release_checksum_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: |
filename_zip="${{ inputs.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip"
Expand All @@ -196,7 +202,7 @@ jobs:
echo "SHA256SUM=${sha256}" >> $GITHUB_ENV
- name: "🆔 Checksum › Release Candidate"
id: checksum-rc
id: task_release_checksum_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: |
filename_zip="${{ inputs.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}-rc.${{ inputs.VERSION_RC }}.zip"
Expand All @@ -206,7 +212,7 @@ jobs:
echo "SHA256SUM=${sha256}" >> $GITHUB_ENV
- name: "🆔 Checksum › Print"
id: checksum-st-check
id: task_release_checksum_st_print
run: |
echo ${{ env.SHA256SUM }}
Expand All @@ -215,7 +221,7 @@ jobs:
# ---------------------------------------------------------------------------------------

- name: "🥸 Contributors › Generate"
id: contribs-generate
id: task_release_contribs_generate
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
Expand All @@ -227,7 +233,7 @@ jobs:
# ---------------------------------------------------------------------------------------

- name: "📦 Zip › Add Checksum › Stable"
id: zip-st
id: task_release_zip_st
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
run: |
echo Zipping STABLE Package .zip PACKAGE_VERSION
Expand All @@ -237,7 +243,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GH_PAT }}

- name: "📦 Zip › Add Checksum › Release Candidate"
id: zip-rc
id: task_release_zip_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
run: |
echo Zipping PRE-RELEASE Package .zip PACKAGE_VERSION
Expand All @@ -257,12 +263,13 @@ jobs:
# ---------------------------------------------------------------------------------------

- name: "📝 Changelog › Pre Setup (Categorized Commits)"
id: task_release_changelog_commits_tags_print
run: |
echo "TAG_LAST=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "COMMIT_LAST=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: "📝 Changelog › Build (Categorized)"
id: changelog-categorized
id: task_release_changelog_categorized
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, false ) }}
uses: mikepenz/release-changelog-builder-action@v4
with:
Expand All @@ -276,7 +283,7 @@ jobs:
fetchViaCommits: true
configurationJson: |
{
"template": "## Gistr Release Info <sup>(${{ steps.dotenv.outputs.UUID }})</sup>\n- <sub>**Version began on**: <sub>........</sub>`#{{FROM_TAG_DATE}}`</sub>\n- <sub>**SHA256**: <sub>................................</sub>`${{ env.SHA256SUM }} 🔺 ${{ env.FILE_ZIP }}`</sub>\n- <sub>**GUID**: <sub>.......................................</sub>`${{ steps.dotenv.outputs.GUID }}`</sub>\n- <sub>**UUID**: <sub>.......................................</sub>`${{ steps.dotenv.outputs.UUID }}`</sub>\n- <sub>**Stamp**: <sub>....................................</sub>`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} 🔺 #{{TO_TAG}}-#{{TO_TAG_DATE}}`</sub>\n- <sub>**Last Release**: <sub>......................</sub>`#{{DAYS_SINCE}} days ago`</sub>\n\n<br>\n\n---\n\n<br>\n\n### What's New\nThis release contains the following changes:\n\n<br>\n\n---\n\n<br>\n\n### Statistics\nHow the files have changed:\n<ul><li><a href='#{{RELEASE_DIFF}}'>Changed files</a> : <b>#{{CHANGED_FILES}}</b> </li><li>Commits : <b>#{{COMMITS}}</b> </li><li>Additions : <b>#{{ADDITIONS}}</b></li><li>Deletions : <b>#{{DELETIONS}}</b></li>\n<br />\n</ul>\n\n<br>\n\n---\n\n<br>\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n<br>\n\n---\n\n<br>\n\n"
"template": "## Gistr Release Info <sup>(${{ steps.task_release_dotenv.outputs.UUID }})</sup>\n- <sub>**Version began on**: <sub>........</sub>`#{{FROM_TAG_DATE}}`</sub>\n- <sub>**SHA256**: <sub>................................</sub>`${{ env.SHA256SUM }} 🔺 ${{ env.FILE_ZIP }}`</sub>\n- <sub>**GUID**: <sub>.......................................</sub>`${{ steps.task_release_dotenv.outputs.GUID }}`</sub>\n- <sub>**UUID**: <sub>.......................................</sub>`${{ steps.task_release_dotenv.outputs.UUID }}`</sub>\n- <sub>**Stamp**: <sub>....................................</sub>`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} 🔺 #{{TO_TAG}}-#{{TO_TAG_DATE}}`</sub>\n- <sub>**Last Release**: <sub>......................</sub>`#{{DAYS_SINCE}} days ago`</sub>\n\n<br>\n\n---\n\n<br>\n\n### What's New\nThis release contains the following changes:\n\n<br>\n\n---\n\n<br>\n\n### Statistics\nHow the files have changed:\n<ul><li><a href='#{{RELEASE_DIFF}}'>Changed files</a> : <b>#{{CHANGED_FILES}}</b> </li><li>Commits : <b>#{{COMMITS}}</b> </li><li>Additions : <b>#{{ADDITIONS}}</b></li><li>Deletions : <b>#{{DELETIONS}}</b></li>\n<br />\n</ul>\n\n<br>\n\n---\n\n<br>\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n<br>\n\n---\n\n<br>\n\n"
}
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
Expand All @@ -288,7 +295,7 @@ jobs:
# ---------------------------------------------------------------------------------------

- name: "📝 Changelog › Build (Uncategorized)"
id: changelog-uncategorized
id: task_release_changelog_uncategorized
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, true ) }}
uses: mikepenz/release-changelog-builder-action@v4
with:
Expand All @@ -302,7 +309,7 @@ jobs:
fetchViaCommits: true
configurationJson: |
{
"template": "## Gistr Release Info <sup>(${{ steps.dotenv.outputs.UUID }})</sup>\n- <sub>**Version began on**: <sub>........</sub>`#{{FROM_TAG_DATE}}`</sub>\n- <sub>**SHA256**: <sub>................................</sub>`${{ env.SHA256SUM }} 🔺 ${{ env.FILE_ZIP }}`</sub>\n- <sub>**GUID**: <sub>.......................................</sub>`${{ steps.dotenv.outputs.GUID }}`</sub>\n- <sub>**UUID**: <sub>.......................................</sub>`${{ steps.dotenv.outputs.UUID }}`</sub>\n- <sub>**Stamp**: <sub>....................................</sub>`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} 🔺 #{{TO_TAG}}-#{{TO_TAG_DATE}}`</sub>\n- <sub>**Last Release**: <sub>......................</sub>`#{{DAYS_SINCE}} days ago`\n</sup>\n\n<br>\n\n---\n\n<br>\n\n### What's New\nThis release contains the following changes:\n\n<br>\n\n---\n\n<br>\n\n### Statistics\nHow the files have changed:\n<ul><li><a href='#{{RELEASE_DIFF}}'>Changed files</a> : <b>#{{CHANGED_FILES}}</b> </li><li>Commits : <b>#{{COMMITS}}</b> </li><li>Additions : <b>#{{ADDITIONS}}</b></li><li>Deletions : <b>#{{DELETIONS}}</b></li>\n<br />\n</ul>\n\n<br>\n\n---\n\n<br>\n\n### Commits (#{{UNCATEGORIZED_COUNT}})\nThe following commits are uncategorized:\n#{{UNCATEGORIZED}}\n\n<br>\n\n---\n\n<br>\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n<br>\n\n---\n\n<br>\n\n"
"template": "## Gistr Release Info <sup>(${{ steps.task_release_dotenv.outputs.UUID }})</sup>\n- <sub>**Version began on**: <sub>........</sub>`#{{FROM_TAG_DATE}}`</sub>\n- <sub>**SHA256**: <sub>................................</sub>`${{ env.SHA256SUM }} 🔺 ${{ env.FILE_ZIP }}`</sub>\n- <sub>**GUID**: <sub>.......................................</sub>`${{ steps.task_release_dotenv.outputs.GUID }}`</sub>\n- <sub>**UUID**: <sub>.......................................</sub>`${{ steps.task_release_dotenv.outputs.UUID }}`</sub>\n- <sub>**Stamp**: <sub>....................................</sub>`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} 🔺 #{{TO_TAG}}-#{{TO_TAG_DATE}}`</sub>\n- <sub>**Last Release**: <sub>......................</sub>`#{{DAYS_SINCE}} days ago`\n</sup>\n\n<br>\n\n---\n\n<br>\n\n### What's New\nThis release contains the following changes:\n\n<br>\n\n---\n\n<br>\n\n### Statistics\nHow the files have changed:\n<ul><li><a href='#{{RELEASE_DIFF}}'>Changed files</a> : <b>#{{CHANGED_FILES}}</b> </li><li>Commits : <b>#{{COMMITS}}</b> </li><li>Additions : <b>#{{ADDITIONS}}</b></li><li>Deletions : <b>#{{DELETIONS}}</b></li>\n<br />\n</ul>\n\n<br>\n\n---\n\n<br>\n\n### Commits (#{{UNCATEGORIZED_COUNT}})\nThe following commits are uncategorized:\n#{{UNCATEGORIZED}}\n\n<br>\n\n---\n\n<br>\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n<br>\n\n---\n\n<br>\n\n"
}
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
Expand All @@ -312,28 +319,30 @@ jobs:
# ---------------------------------------------------------------------------------------

- name: "📝 Changelog › Print (Categorized)"
id: task_release_changelog_print_categorized
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, false ) }}
run: |
echo "${{ steps.changelog-categorized.outputs.changelog }}"
echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}"
- name: "📝 Changelog › Print (Uncategorized)"
id: task_release_changelog_print_uncategorized
if: ${{ startsWith( inputs.SHOW_UNCATEGORIZED, true ) }}
run: |
echo "${{ steps.changelog-uncategorized.outputs.changelog }}"
echo "${{ steps.task_release_changelog_uncategorized.outputs.changelog }}"
# ---------------------------------------------------------------------------------------
# [ Release ]: Post Release
#
# outputs:
# [RELEASE ID]:
# ${{ steps.bundle-rc.outputs.id
# ${{ steps.bundle-st.outputs.id
# ${{ steps.task_release_bundle_rc.outputs.id
# ${{ steps.task_release_bundle_st.outputs.id
# ---------------------------------------------------------------------------------------

- name: "🏳️ Post › Stable"
if: ${{ startsWith( inputs.PRERELEASE, false ) }}
uses: softprops/action-gh-release@v2
id: bundle-st
id: task_release_bundle_st
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }}
with:
Expand All @@ -351,13 +360,13 @@ jobs:
SHA256SUMS.txt
prerelease: false
body: |
${{ steps.changelog-categorized.outputs.changelog }}
${{ steps.changelog-uncategorized.outputs.changelog }}
${{ steps.task_release_changelog_categorized.outputs.changelog }}
${{ steps.task_release_changelog_uncategorized.outputs.changelog }}
- name: "🏳️ Post › Release Candidate"
id: task_release_bundle_rc
if: ${{ startsWith( inputs.PRERELEASE, true ) }}
uses: softprops/action-gh-release@v2
id: bundle-rc
env:
GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
with:
Expand All @@ -378,20 +387,21 @@ jobs:
> [!WARNING]
> This is a **release candidate**, which means it is not a stable release and could contain bugs. You should download it at your own risk.
${{ steps.changelog-categorized.outputs.changelog }}
${{ steps.changelog-uncategorized.outputs.changelog }}
${{ steps.task_release_changelog_categorized.outputs.changelog }}
${{ steps.task_release_changelog_uncategorized.outputs.changelog }}
# ---------------------------------------------------------------------------------------
# Print Status
# ---------------------------------------------------------------------------------------

- name: "🎛️ Status › Print"
id: task_release_status_print
run: |
echo "Printing Variables"
echo
echo "---- CHANGELOG ---------------------------------------------------------------"
echo "${{ steps.changelog-categorized.outputs.changelog }}"
echo "${{ steps.changelog-uncategorized.outputs.changelog }}"
echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}"
echo "${{ steps.task_release_changelog_uncategorized.outputs.changelog }}"
echo "---- CHANGELOG ---------------------------------------------------------------"
echo ""
echo ""
Expand All @@ -400,6 +410,6 @@ jobs:
echo "Tag: Previous .............. ${{ env.TAG_LAST }}"
echo "Tag: Now.... ............... ${{ github.ref }}"
echo "Last Commit ................ ${{ env.COMMIT_LAST }}"
echo "ST Output ID ............... ${{ steps.bundle-st.outputs.id }}"
echo "RC Output ID ............... ${{ steps.bundle-rc.outputs.id }}"
echo "ST Output ID ............... ${{ steps.task_release_bundle_st.outputs.id }}"
echo "RC Output ID ............... ${{ steps.task_release_bundle_rc.outputs.id }}"
echo "---- CHANGELOG ---------------------------------------------------------------"

0 comments on commit b17ea12

Please sign in to comment.