diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..3f50c7352 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,10 @@ +custom: ["https://buymeacoffee.com/aetherinox"] +github: # [repo-name, aetherinox] +patreon: # Replace with a single Patreon username +open_collective: # name +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..f818a2068 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,50 @@ + + +# Pull Request +Select which topic best describes your contribution: + +- [ ] Feature +- [ ] Bug +- [ ] Documentation / Wiki + +--- + + +
+ + + +### Description +Explain here what your pull request includes and what you've done + + + +
+ +--- + +
+ + +### Before You Submit +Please ensure you check the following items to indicate that you've read this section and completed each task + +- [ ] My code follows the [Contribution Guidelines](https://github.com/Aetherinox/opengist-debian/blob/main/CONTRIBUTING.md) +- [ ] I give expressed consent for my work to be used in this repo +- [ ] I have tested my work and it functions as intended +- [ ] I have included documentation if the change requires such diff --git a/.github/changelog-configuration.json b/.github/changelog-configuration.json new file mode 100644 index 000000000..1308884f4 --- /dev/null +++ b/.github/changelog-configuration.json @@ -0,0 +1,95 @@ +{ + "categories": [ + { + "title": "\n\n
\n\n#### ๐Ÿช› Continuous integration", + "labels": [ "kind/ci", "ci" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿš€ Features", + "labels": [ "kind/feature", "feature", "feat" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿ› Bugfixes", + "labels": [ "kind/bug", "fix", "bug" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿ”ง Changes", + "labels": [ "kind/chore", "change", "chore" ] + }, + { + "title": "\n\n
\n\nn#### โœจ Optimizations", + "labels": [ "kind/perf", "optimization", "perf", "optimize" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿšจ Security ", + "labels": [ "kind/security", "security" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿงน Housekeeping", + "labels": [ "kind/refactor", "refactor", "style" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿ’ Miscellaneous", + "labels": [ "kind/misc", "misc" ] + }, + { + "title": "\n\n
\n\n#### โ›” Deprecated", + "labels": [ "kind/deprecate", "deprecate" ] + }, + { + "title": "\n\n
\n\n#### โ›” Removed", + "labels": [ "kind/remove", "remove" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿ“ฆ Build & Dependencies", + "labels": [ "kind/build", "build", "dependency", "dep", "package" ] + }, + { + "title": "\n\n
\n\n#### โœ๏ธ Docs", + "labels": [ "kind/docs", "doc", "docs", "wiki" ] + }, + { + "title": "\n\n
\n\n#### ๐Ÿงช Tests & Demo Vault", + "labels": [ "kind/test", "test", "tests", "vault" ] + } + ], + "sort": "ASC", + "pr_template": "- ${{TITLE_ONLY}} : #{{MERGE_SHA}} @#{{AUTHOR}}", + "empty_template": "- No major changes to address in this release", + "custom_placeholders": [ + { + "name": "TITLE_ONLY", + "source": "TITLE", + "transformer": { + "method": "regexr", + "pattern": "(\\w+(\\(.+\\))?: ?)?(.+)", + "target": "$2 $3" + } + } + ], + "label_extractor": [ + { + "pattern": "^(build|ci|change|chore|doc|docs|wiki|remove|deprecate|security|dependency|dep|package|feat|feature|fix|bug|perf|optimize|optimization|refactor|style|test|tests|vault):(.*)", + "target": "$1", + "on_property": "title" + }, + { + "pattern": "^(build|ci|change|chore|doc|docs|wiki|remove|deprecate|security|dependency|dep|package|feat|feature|fix|bug|perf|optimize|optimization|refactor|style|test|tests|vault){1}(\\([\\w\\-\\.]+\\))?(!)?:(.*)", + "target": "$1", + "on_property": "title" + } + ], + "duplicate_filter": { + "pattern": "github.*", + "on_property": "author", + "method": "match" + }, + "max_tags_to_fetch": 200, + "max_pull_requests": 200, + "max_back_track_time_days": 365, + "exclude_merge_branches": [], + "tag_resolver": { + "method": "semver" + }, + "base_branches": [] +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..6f733debd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,37 @@ +# MIT License +# +# Copyright (c) 2024 Aetherinox +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + labels: + - "Type โ—ฆ Dependency" + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + labels: + - "Type โ—ฆ Git Action" \ No newline at end of file diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..4085b2ce6 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,45 @@ +# Number of labels to fetch (optional). Defaults to 100 +numLabels: 40 +# These labels will not be used even if the issue contains them (optional). +# Pass a blank array if no labels are to be excluded. +# excludeLabels: [] +excludeLabels: + - pinned +# custom configuration to override default behaviour +# control explicitly what gets added and when +custom: + - location: title + keywords: + - '[roadmap]' + labels: + - Type โ—ฆ Roadmap + - location: title + keywords: + - '[road-map]' + labels: + - Type โ—ฆ Roadmap + - location: title + keywords: + - '[bug]' + labels: + - Type โ—ฆ Bug + - location: title + keywords: + - '[issue]' + labels: + - Type โ—ฆ Bug + - location: title + keywords: + - '[feature]' + labels: + - Type โ—ฆ Feature + - location: body + keywords: + - 'request feature' + labels: + - Type โ—ฆ Feature + - location: title + keywords: + - '[request]' + labels: + - Type โ—ฆ Feature \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf819aa66..f3e0508c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -279,7 +279,7 @@ jobs: if: ${{ startsWith( inputs.PRERELEASE, false ) }} uses: actions/upload-artifact@v4 with: - name: ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }} + name: ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}.zip path: ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}.zip retention-days: 30 @@ -289,6 +289,224 @@ jobs: if: ${{ startsWith( inputs.PRERELEASE, true ) }} uses: actions/upload-artifact@v4 with: - name: ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}-rc.${{ inputs.VERSION_RC }} + name: ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}-rc.${{ inputs.VERSION_RC }}.zip path: ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}-rc.${{ inputs.VERSION_RC }}.zip - retention-days: 30 \ No newline at end of file + retention-days: 30 + + # --------------------------------------------------------------------------------------- + # [ Tag ]: Pre Create + # + # in order to use the changelog github action, you must pre-create the tag otherwise + # the changelog action will have no idea what tag you are going to be creating and + # the list of commits will not be for the correct release. + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿ”– Tag โ€บ Pre Create ${{ inputs.PLUGIN_VERSION }}" + uses: rickstaa/action-create-tag@v1 + id: task_release_tag + with: + tag: ${{ inputs.PLUGIN_VERSION }} + tag_exists_error: false + message: "Latest release" + gpg_private_key: ${{ secrets.ADMINSERV_GPG_KEY_ASC }} + gpg_passphrase: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }} + + # --------------------------------------------------------------------------------------- + # [ Tag ]: Confirm + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿ”– Tag โ€บ Confirm ${{ inputs.PLUGIN_VERSION }}" + run: | + echo "Tag already present: ${{ env.TAG_EXISTS }}" + echo "Tag already present: ${{ steps.task_release_tag.outputs.tag_exists }}" + + # --------------------------------------------------------------------------------------- + # Contributor Images + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿฅธ Contributors โ€บ Generate" + id: task_release_contribs_generate + uses: jaywcjlove/github-action-contributors@main + with: + filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) + output: CONTRIBUTORS.svg + avatarSize: 42 + + # --------------------------------------------------------------------------------------- + # Generate Changelog + # + # generates a changelog from the github api. requires a PREVIOUS_TAG in order to figure + # out the changes made between the two versions. + # + # outputs: + # ${{ steps.changelog.outputs.changelog }} + # --------------------------------------------------------------------------------------- + + - 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: task_release_changelog_categorized + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, false ) || + startsWith( env.SHOW_UNCATEGORIZED, false ) + uses: mikepenz/release-changelog-builder-action@v4 + with: + token: ${{ secrets.ADMINSERV_TOKEN }} + configuration: ".github/changelog-configuration.json" + ignorePreReleases: false + commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }} + fetchReleaseInformation: true + fetchViaCommits: true + configurationJson: | + { + "template": "## Release Info \n| Item | Value |\n| --- | --- |\n|Stamp|`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} ๐Ÿ”บ #{{TO_TAG}}-#{{TO_TAG_DATE}}`|\n|Last Release|`#{{DAYS_SINCE}} days ago`|\n\n
\n\n---\n\n
\n\n### What's New\nThis release contains the following changes:\n\n
\n\n---\n\n
\n\n### Statistics\nHow the files have changed:\n\n\n
\n\n---\n\n
\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n
\n\n---\n\n
\n\n" + } + env: + GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} + + # --------------------------------------------------------------------------------------- + # shows only categorized commits using the commit standards + # type(scope): description + # type: description + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿ“ Changelog โ€บ Build (Uncategorized)" + id: task_release_changelog_uncategorized + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, true ) || + startsWith( env.SHOW_UNCATEGORIZED, true ) + uses: mikepenz/release-changelog-builder-action@v4 + with: + token: ${{ secrets.ADMINSERV_TOKEN }} + configuration: ".github/changelog-configuration.json" + ignorePreReleases: false + commitMode: ${{ inputs.CHANGELOG_MODE_COMMIT || env.CHANGELOG_MODE_COMMIT }} + fetchReleaseInformation: true + fetchViaCommits: true + configurationJson: | + { + "template": "## Release Info \n| Item | Value |\n| --- | --- |\n|Stamp|`#{{FROM_TAG}}-#{{FROM_TAG_DATE}} ๐Ÿ”บ #{{TO_TAG}}-#{{TO_TAG_DATE}}`|\n|Last Release|`#{{DAYS_SINCE}} days ago`|\n\n
\n\n---\n\n
\n\n### What's New\nThis release contains the following changes:\n\n
\n\n---\n\n
\n\n### Statistics\nHow the files have changed:\n\n\n
\n\n---\n\n
\n\n### Pull Requests\nThis release is associated with the following pull requests:\n#{{CHANGELOG}}\n\n
\n\n" + } + env: + GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} + + # --------------------------------------------------------------------------------------- + # Fetch Changelog + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿ“ Changelog โ€บ Print (Categorized)" + id: task_release_changelog_print_categorized + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, false ) || + startsWith( env.SHOW_UNCATEGORIZED, false ) + run: | + echo "${{ steps.task_release_changelog_categorized.outputs.changelog }}" + + - name: "๐Ÿ“ Changelog โ€บ Print (Uncategorized)" + id: task_release_changelog_print_uncategorized + if: | + startsWith( inputs.SHOW_UNCATEGORIZED, true ) || + startsWith( env.SHOW_UNCATEGORIZED, true ) + run: | + echo "${{ steps.task_release_changelog_uncategorized.outputs.changelog }}" + + # --------------------------------------------------------------------------------------- + # artifacts > download + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿ“ Download โ€บ Saved Artifacts" + uses: actions/download-artifact@v4 + + # --------------------------------------------------------------------------------------- + # Clean dist folder since we're getting the files from artifacts + # --------------------------------------------------------------------------------------- + + - name: "โš™๏ธ Debug โ€บ Clean Dist Folder" + run: | + tree + + # --------------------------------------------------------------------------------------- + # [ Release ]: Post Release + # + # outputs: + # [RELEASE ID]: + # ${{ steps.task_release_bundle_rc.outputs.id + # ${{ steps.task_release_bundle_st.outputs.id + # --------------------------------------------------------------------------------------- + + - name: "๐Ÿณ๏ธ Post โ€บ Stable" + id: task_release_bundle_st + if: | + startsWith( inputs.PRERELEASE, false ) || + startsWith( env.PRERELEASE, false ) + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN_CL }} + with: + token: ${{ secrets.ADMINSERV_TOKEN_CL }} + name: v${{ env.PACKAGE_VERSION }} + tag_name: ${{ env.PACKAGE_VERSION }} + target_commitish: ${{ github.event.inputs.branch }} + draft: false + generate_release_notes: false + files: | + ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}.zip + release/${{ inputs.PLUGIN_NAME }}-v${{ steps.task_build_download_csf.outputs.VERSION_CSF }}.tgz + prerelease: false + body: | + ${{ 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 ) || + startsWith( env.PRERELEASE, true ) + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.ADMINSERV_TOKEN }} + with: + token: ${{ secrets.ADMINSERV_TOKEN }} + name: v${{ env.PACKAGE_VERSION }} + tag_name: ${{ env.PACKAGE_VERSION }} + target_commitish: ${{ github.event.inputs.branch }} + draft: false + generate_release_notes: false + files: | + ${{ inputs.PLUGIN_NAME }}-${{ env.VERSION_CSF }}-rc.${{ inputs.VERSION_RC }}.zip + release/${{ inputs.PLUGIN_NAME }}-v${{ steps.task_build_download_csf.outputs.VERSION_CSF }}.tgz + prerelease: false + body: | + > [!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.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.task_release_changelog_categorized.outputs.changelog }}" + echo "${{ steps.task_release_changelog_uncategorized.outputs.changelog }}" + echo "---- CHANGELOG ---------------------------------------------------------------" + echo "" + echo "" + echo "---- VARIABLES ---------------------------------------------------------------" + echo "Package Version ............ ${{ env.PACKAGE_VERSION }}" + echo "Tag: Previous .............. ${{ env.TAG_LAST }}" + echo "Tag: Now.... ............... ${{ github.ref }}" + echo "Last Commit ................ ${{ env.COMMIT_LAST }}" + echo "ST Output ID ............... ${{ steps.task_release_bundle_st.outputs.id }}" + echo "RC Output ID ............... ${{ steps.task_release_bundle_rc.outputs.id }}" + echo "---- CHANGELOG ---------------------------------------------------------------"