parent
e1477bb599
commit
3efaba177f
4 changed files with 36 additions and 79 deletions
29
.gitea/workflows/build.yml
Normal file
29
.gitea/workflows/build.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: ['*']
|
||||||
|
pull_request:
|
||||||
|
branches: ['*']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone project
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install JDK 8
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '8'
|
||||||
|
distribution: 'temurin'
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Setup gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
|
- name: Run build & publish with Gradle Wrapper
|
||||||
|
if: gitea.ref == 'refs/heads/master'
|
||||||
|
run: chmod +x ./gradlew && ./gradlew build publishAllPublicationsToMavenRepository -PnetheriteRepoUsername=${{ secrets.REPOSILITE_USER }} -PnetheriteRepoPassword=${{ secrets.REPOSILITE_PASSWORD }}
|
29
.github/workflows/close-invalid-prs.yml
vendored
29
.github/workflows/close-invalid-prs.yml
vendored
|
@ -1,29 +0,0 @@
|
||||||
# Thanks paper: https://github.com/papermc/paper/blob/master/.github/workflows/close_invalid_prs.yml
|
|
||||||
name: Close invalid PRs
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [ opened ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
name: Close invalid PRs
|
|
||||||
if: |
|
|
||||||
github.repository != github.event.pull_request.head.repo.full_name &&
|
|
||||||
(
|
|
||||||
github.head_ref == 'master' ||
|
|
||||||
github.event.pull_request.head.repo.owner.type != 'User'
|
|
||||||
)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: superbrothers/close-pull-request@v3
|
|
||||||
id: "master_branch"
|
|
||||||
if: github.head_ref == 'master'
|
|
||||||
with:
|
|
||||||
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
|
|
||||||
|
|
||||||
- uses: superbrothers/close-pull-request@v3
|
|
||||||
id: "org_account"
|
|
||||||
if: github.event.pull_request.head.repo.owner.type != 'User' && steps.master_branch.outcome == 'skipped'
|
|
||||||
with:
|
|
||||||
comment: "Please do not open pull requests from non-user accounts like organisations. Create a fork on a user account instead."
|
|
46
.github/workflows/dev-build-release.yml
vendored
46
.github/workflows/dev-build-release.yml
vendored
|
@ -1,46 +0,0 @@
|
||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches: ['*']
|
|
||||||
pull_request:
|
|
||||||
branches: ['*']
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
TYCOONS_REPO_USER: ${{ secrets.EVOKE_REPO_USERNAME }}
|
|
||||||
TYCOONS_REPO_PASS: ${{ secrets.EVOKE_REPO_PASSWORD }}
|
|
||||||
steps:
|
|
||||||
- name: Clone project
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install JDK 8
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '8'
|
|
||||||
distribution: 'temurin'
|
|
||||||
check-latest: true
|
|
||||||
|
|
||||||
- name: Setup gradle
|
|
||||||
uses: gradle/actions/setup-gradle@v4
|
|
||||||
|
|
||||||
- name: Run build & publish with Gradle Wrapper
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
run: chmod +x ./gradlew && ./gradlew publishAllPublicationsToMavenRepository
|
|
||||||
|
|
||||||
- name: Run build with Gradle Wrapper
|
|
||||||
if: github.ref != 'refs/heads/master'
|
|
||||||
run: chmod +x ./gradlew && ./gradlew build
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
name: '${{ github.ref_name }}: ${{ github.event.head_commit.message }} (${{ github.sha }})'
|
|
||||||
prerelease: ${{ github.ref != 'refs/heads/master' }}
|
|
||||||
tag_name: ${{ github.ref_name }}-${{ github.sha }}
|
|
|
@ -48,10 +48,13 @@ publishing {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.evokegames.gg/snapshots")
|
url = uri("https://git.netherite.gg/api/packages/Netherite-Public/maven")
|
||||||
credentials {
|
credentials(HttpHeaderCredentials) {
|
||||||
username = System.getenv("TYCOONS_REPO_USER")
|
name = "Authorization"
|
||||||
password = System.getenv("TYCOONS_REPO_PASS")
|
value = "token ${project.properties["netherite.git.packages.token"]}"
|
||||||
|
}
|
||||||
|
authentication {
|
||||||
|
header(HttpHeaderAuthentication)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue