mirror of
https://github.com/darksaid98/AlathranCommands.git
synced 2026-12-01 15:38:52 +00:00
refactor: wip refactor
This commit is contained in:
87 files changed
+3585
-1540
No files matched your search
@@ -0,0 +1,93 @@
|
||||
name: Build & Upload Release jar with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'master'
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'master'
|
||||
schedule:
|
||||
- cron: '0 0 * * 6'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ format('{0}-{1}', github.job, github.ref) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
java: [ 17 ]
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./.github/actions/gradle
|
||||
|
||||
- name: Setup JDK
|
||||
uses: ./.github/actions/jdk
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew clean build --info
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} Snapshot
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
release:
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 17 ]
|
||||
if: github.ref_type == 'tag' || ((github.ref_name == 'main' || github.ref_name == 'master') && github.event_name != 'schedule')
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: ./.github/actions/gradle
|
||||
|
||||
- name: Setup JDK
|
||||
uses: ./.github/actions/jdk
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- name: Set Release Environment Variable
|
||||
if: github.ref_type == 'tag'
|
||||
run: |
|
||||
echo "CUSTOM_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build with Gradle
|
||||
if: github.ref_type != 'tag'
|
||||
run: ./gradlew clean build
|
||||
|
||||
- name: Build with Gradle
|
||||
if: github.ref_type == 'tag'
|
||||
run: ./gradlew clean build -PcustomVersion=${{ env.CUSTOM_VERSION }}
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
id: release
|
||||
if: github.ref_type == 'tag'
|
||||
with:
|
||||
name: ${{ format('Release {0}', github.ref_name) }}
|
||||
files: ${{ github.workspace }}/build/libs/*
|
||||
prerelease: ${{ contains(github.ref_name, '-RC-') }}
|
||||
generate_release_notes: true
|
||||
fail_on_unmatched_files: true
|
||||
draft: false
|
||||
@@ -0,0 +1,26 @@
|
||||
name: 'Close Stale Issues & PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: ' This issue has been automatically marked as stale because it has been open for 60 days with no activity.'
|
||||
stale-pr-message: 'This PR has been automatically marked as stale because it has been open for 60 days with no activity.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for -1 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stalled for -1 days with no activity.'
|
||||
days-before-issue-stale: 60
|
||||
days-before-pr-stale: 60
|
||||
days-before-issue-close: -1
|
||||
days-before-pr-close: -1
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
Reference in new issue
Block a user