From 1ea30965401078437c961327f1dabde8755c390d Mon Sep 17 00:00:00 2001 From: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> Date: Fri, 24 Nov 2023 07:45:47 +0800 Subject: [PATCH 1/4] Create Cache Signed-off-by: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> --- .github/workflows/maven-publish.yml/Cache | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/maven-publish.yml/Cache diff --git a/.github/workflows/maven-publish.yml/Cache b/.github/workflows/maven-publish.yml/Cache new file mode 100644 index 000000000..1c931cd72 --- /dev/null +++ b/.github/workflows/maven-publish.yml/Cache @@ -0,0 +1,52 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Cache + uses: actions/cache@v3.3.2 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: + # An explicit key for restoring and saving the cache + key: + # An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. + restore-keys: # optional + # The chunk size used to split up large files during upload, in bytes + upload-chunk-size: # optional + # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms + enableCrossOsArchive: # optional, default is false + # Fail the workflow if cache entry is not found + fail-on-cache-miss: # optional, default is false + # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache + lookup-only: # optional, default is false + From 895f99a436c4e1a09fb607135ef91eb8f50a679d Mon Sep 17 00:00:00 2001 From: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> Date: Fri, 24 Nov 2023 07:54:30 +0800 Subject: [PATCH 2/4] Create Setup Node.js environment Signed-off-by: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> --- .../Setup Node.js environment | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/maven-publish.yml/Setup Node.js environment diff --git a/.github/workflows/maven-publish.yml/Setup Node.js environment b/.github/workflows/maven-publish.yml/Setup Node.js environment new file mode 100644 index 000000000..bc98fba32 --- /dev/null +++ b/.github/workflows/maven-publish.yml/Setup Node.js environment @@ -0,0 +1,58 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Setup Node.js environment + uses: actions/setup-node@v4.0.0 + with: + # Set always-auth in npmrc. + always-auth: # optional, default is false + # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0. + node-version: # optional + # File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions. + node-version-file: # optional + # Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. + architecture: # optional + # Set this option if you want the action to check for the latest available version that satisfies the version spec. + check-latest: # optional + # Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN. + registry-url: # optional + # Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/). + scope: # optional + # Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. + token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }} + # Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm. + cache: # optional + # Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. + cache-dependency-path: # optional + From 4f4a7d0b39bf80f7c19177853ad520fccd260da0 Mon Sep 17 00:00:00 2001 From: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> Date: Fri, 24 Nov 2023 07:56:08 +0800 Subject: [PATCH 3/4] Create Setup .NET Core SDK Signed-off-by: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> --- .../maven-publish.yml/Setup .NET Core SDK | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/maven-publish.yml/Setup .NET Core SDK diff --git a/.github/workflows/maven-publish.yml/Setup .NET Core SDK b/.github/workflows/maven-publish.yml/Setup .NET Core SDK new file mode 100644 index 000000000..37649caf5 --- /dev/null +++ b/.github/workflows/maven-publish.yml/Setup .NET Core SDK @@ -0,0 +1,54 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v3.2.0 + with: + # Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx + dotnet-version: # optional + # Optional quality of the build. The possible values are: daily, signed, validated, preview, ga. + dotnet-quality: # optional + # Optional global.json location, if your global.json isn't located in the root of the repo. + global-json-file: # optional + # Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword + source-url: # optional + # Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository's owner. Only used if a GPR URL is also provided in source-url + owner: # optional + # Optional NuGet.config location, if your NuGet.config isn't located in the root of the repo. + config-file: # optional + # Optional input to enable caching of the NuGet global-packages folder + cache: # optional + # Used to specify the path to a dependency file: packages.lock.json. Supports wildcards or a list of file names for caching multiple dependencies. + cache-dependency-path: # optional + From 9c1f4663219b164c67f176a6eeae413e333d9690 Mon Sep 17 00:00:00 2001 From: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> Date: Fri, 24 Nov 2023 08:00:41 +0800 Subject: [PATCH 4/4] Create Close Stale Issues Signed-off-by: Sam Ken <149315347+SHArPyCoBRA@users.noreply.github.com> --- .../maven-publish.yml/Close Stale Issues | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 .github/workflows/maven-publish.yml/Close Stale Issues diff --git a/.github/workflows/maven-publish.yml/Close Stale Issues b/.github/workflows/maven-publish.yml/Close Stale Issues new file mode 100644 index 000000000..f0257be15 --- /dev/null +++ b/.github/workflows/maven-publish.yml/Close Stale Issues @@ -0,0 +1,138 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Close Stale Issues + uses: actions/stale@v4.1.1 + with: + # Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`. + repo-token: # optional, default is ${{ github.token }} + # The message to post on the issue when tagging it. If none provided, will not mark issues stale. + stale-issue-message: # optional + # The message to post on the pull request when tagging it. If none provided, will not mark pull requests stale. + stale-pr-message: # optional + # The message to post on the issue when closing it. If none provided, will not comment when closing an issue. + close-issue-message: # optional + # The message to post on the pull request when closing it. If none provided, will not comment when closing a pull requests. + close-pr-message: # optional + # The number of days old an issue or a pull request can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically. + days-before-stale: # optional, default is 60 + # The number of days old an issue can be before marking it stale. Set to -1 to never mark issues as stale automatically. Override "days-before-stale" option regarding only the issues. + days-before-issue-stale: # optional + # The number of days old a pull request can be before marking it stale. Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option regarding only the pull requests. + days-before-pr-stale: # optional + # The number of days to wait to close an issue or a pull request after it being marked stale. Set to -1 to never close stale issues or pull requests. + days-before-close: # optional, default is 7 + # The number of days to wait to close an issue after it being marked stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues. + days-before-issue-close: # optional + # The number of days to wait to close a pull request after it being marked stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests. + days-before-pr-close: # optional + # The label to apply when an issue is stale. + stale-issue-label: # optional, default is Stale + # The label to apply when an issue is closed. + close-issue-label: # optional + # The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2"). + exempt-issue-labels: # optional, default is + # The label to apply when a pull request is stale. + stale-pr-label: # optional, default is Stale + # The label to apply when a pull request is closed. + close-pr-label: # optional + # The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2"). + exempt-pr-labels: # optional, default is + # The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). + exempt-milestones: # optional, default is + # The milestones that mean an issue is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the issues. + exempt-issue-milestones: # optional, default is + # The milestones that mean a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the pull requests. + exempt-pr-milestones: # optional, default is + # Exempt all issues and pull requests with milestones from being marked as stale. Default to false. + exempt-all-milestones: # optional, default is false + # Exempt all issues with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the issues. + exempt-all-issue-milestones: # optional, default is + # Exempt all pull requests with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the pull requests. + exempt-all-pr-milestones: # optional, default is + # Only issues or pull requests with all of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. + only-labels: # optional, default is + # Only issues or pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. + any-of-labels: # optional, default is + # Only issues with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the issues. + any-of-issue-labels: # optional, default is + # Only pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the pull requests. + any-of-pr-labels: # optional, default is + # Only issues with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the issues. + only-issue-labels: # optional, default is + # Only pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the pull requests. + only-pr-labels: # optional, default is + # The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related). + operations-per-run: # optional, default is 30 + # Remove stale labels from issues and pull requests when they are updated or commented on. + remove-stale-when-updated: # optional, default is true + # Remove stale labels from issues when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the issues. + remove-issue-stale-when-updated: # optional, default is + # Remove stale labels from pull requests when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the pull requests. + remove-pr-stale-when-updated: # optional, default is + # Run the processor in debug mode without actually performing any operations on live issues. + debug-only: # optional, default is false + # The order to get issues or pull requests. Defaults to false, which is descending. + ascending: # optional, default is false + # Delete the git branch after closing a stale pull request. + delete-branch: # optional, default is false + # The date used to skip the stale action on issue/pull request created before it (ISO 8601 or RFC 2822). + start-date: # optional, default is + # The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). + exempt-assignees: # optional, default is + # The assignees which exempt an issue from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the issues. + exempt-issue-assignees: # optional, default is + # The assignees which exempt a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the pull requests. + exempt-pr-assignees: # optional, default is + # Exempt all issues and pull requests with assignees from being marked as stale. Default to false. + exempt-all-assignees: # optional, default is false + # Exempt all issues with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the issues. + exempt-all-issue-assignees: # optional, default is + # Exempt all pull requests with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the pull requests. + exempt-all-pr-assignees: # optional, default is + # Exempt draft pull requests from being marked as stale. Default to false. + exempt-draft-pr: # optional, default is false + # Display some statistics at the end regarding the stale workflow (only when the logs are enabled). + enable-statistics: # optional, default is true + # A comma delimited list of labels to add when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it. + labels-to-add-when-unstale: # optional, default is + # A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it. + labels-to-remove-when-unstale: # optional, default is + # Any update (update/comment) can reset the stale idle time on the issues and pull requests. + ignore-updates: # optional, default is false + # Any update (update/comment) can reset the stale idle time on the issues. Override "ignore-updates" option regarding only the issues. + ignore-issue-updates: # optional, default is + # Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests. + ignore-pr-updates: # optional, default is +