chore: fix up newline on windows for builds
This commit is contained in:
parent
edfbb713c6
commit
34a083f620
|
@ -1,40 +0,0 @@
|
|||
name: Build Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '8.0'
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew buildSubmodules build
|
||||
- name: Upload to Discord (If pre-release tag)
|
||||
if: "startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')"
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
run: ./gradlew discordupload
|
||||
- name: Publish to Curseforge (If release tag)
|
||||
if: "startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')"
|
||||
env:
|
||||
CURSE_API: ${{ secrets.CURSE_API }}
|
||||
run: ./gradlew curseforge
|
|
@ -0,0 +1,57 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
name: release-please
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
upload_url: ${{ steps.release.outputs.upload_url }}
|
||||
# https://github.com/google-github-actions/release-please-action in case more config is needed
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release
|
||||
with:
|
||||
command: manifest
|
||||
token: ${{ secrets.PAT }}
|
||||
# See how to configure file https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md
|
||||
# See output info at https://github.com/google-github-actions/release-please-action#configuration for variables
|
||||
|
||||
# Possibly optimise this by building and then passing the folder across to these stages
|
||||
release:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
release-task: [curseforge, discordupload, modrinth]
|
||||
needs: release-please
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.release-please.outputs.release_created }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: 17
|
||||
- name: Download MC assets
|
||||
run: ./gradlew downloadAssets || ./gradlew downloadAssets || (sleep 30s && ./gradlew downloadAssets)
|
||||
- name: Run DataGen
|
||||
run: ./gradlew runData
|
||||
- name: Build and publish (release)
|
||||
env:
|
||||
CURSE_API: ${{ secrets.CURSE_API }}
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
IS_RELEASE: true
|
||||
run: |
|
||||
# Build
|
||||
./gradlew build ${{ matrix.release-task }}
|
|
@ -0,0 +1,37 @@
|
|||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
name: Build
|
||||
jobs:
|
||||
snapshot:
|
||||
#if: ${{!startsWith(github.ref.split(’/’)[2], 'release-please')}}
|
||||
runs-on: ubuntu-latest
|
||||
# https://github.com/google-github-actions/release-please-action in case more config is needed
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# these if statements ensure that a publication only occurs when
|
||||
# a new release is created:
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Download MC assets
|
||||
run: ./gradlew downloadAssets --info --debug || ./gradlew downloadAssets --info --debug || (sleep 30s && ./gradlew downloadAssets --info --debug)
|
||||
- name: Run DataGen
|
||||
run: ./gradlew runData
|
||||
- name: Build and upload preview (run for non-release builds)
|
||||
if: ${{ github.ref && !contains( github.ref, 'renovate/deps') }}
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
run: |
|
||||
# Build
|
||||
./gradlew build discordupload
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
".": "0.9.2"
|
||||
}
|
|
@ -38,7 +38,7 @@ apply from: 'env-variables.gradle'
|
|||
|
||||
archivesBaseName = "Advanced-Portals"
|
||||
group = 'com.sekwah.advancedportals'
|
||||
def versionString = (file('./version.txt').text + (isRelease ? "" : "-${snapshotName}${shaRef}")).replaceAll('\n', '')
|
||||
def versionString = (file('./version.txt').text + (isRelease ? "" : "-${snapshotName}${shaRef}")).replaceAll('\n', '').replaceAll('\r', '')
|
||||
setVersion(versionString)
|
||||
println "Version: ${getVersion()}"
|
||||
|
||||
|
@ -85,7 +85,7 @@ jar {
|
|||
|
||||
}
|
||||
minecraftServerConfig {
|
||||
jarUrl.set('https://download.getbukkit.org/spigot/spigot-1.19.4.jar')
|
||||
jarUrl.set('https://download.getbukkit.org/spigot/spigot-1.20.2.jar')
|
||||
jvmArgument = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue