Skip to content

Commit

Permalink
CI Nightly Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
robotgryphon committed Jan 24, 2024
1 parent f19823c commit b9d1fdf
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 13 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/ci-tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,51 @@ jobs:
runs-on: ubuntu-20.04
outputs:
release_type: ${{steps.cf_release_type.outputs.value }}
version: ${{steps.version.outputs.version }}
build: ${{steps.build.outputs.buildver}}

steps:
- name: Checkout
uses: actions/[email protected]

uses: actions/checkout@v3

- name: Unshallow
run: git fetch --prune --unshallow

- name: Find Current Tag
id: current
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: '@'
skip-unshallow: 'true'

- name: Release Type
id: cf_release_type
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
property: 'cf_release_type'

- name: Semver Version
id: version
run: |
version=$(echo "${{steps.current.outputs.tag}}" | cut -dv -f2)
echo "::set-output name=version::$version"
- name: Build Version
id: build
run: |
buildver=$(git describe --tags --match v* | cut -d- -f2)
echo "build = $buildver"
echo "::set-output name=buildver::$buildver"
tests:
name: Gradle Tests
runs-on: ubuntu-20.04
needs: [ vars ]
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

- name: Unshallow and Get Tags
run: git fetch --prune --unshallow --tags
Expand All @@ -61,10 +88,17 @@ jobs:
- name: Create datagen assets
continue-on-error: true
run: ./gradlew runData

env:
CM_RELEASE: false
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}

- name: Test JAR with GameTest Server
run: ./gradlew runGameTestServer
env:
CM_RELEASE: false
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -81,7 +115,7 @@ jobs:
needs: [ vars, tests ]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Unshallow and Get Tags
run: git fetch --prune --unshallow --tags
Expand All @@ -106,10 +140,16 @@ jobs:

- name: Generate Resources
run: ./gradlew runData
env:
CM_RELEASE: false
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}

- name: Publish gradle nightly jar
run: ./gradlew publishNightlyPublicationToGitHubPackagesRepository
run: ./gradlew publishReleasePublicationToGitHubPackagesRepository
env:
CM_RELEASE: false
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 16 additions & 7 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
cf_project: ${{steps.cf_project.outputs.value }}
mod_id: ${{steps.mod_id.outputs.value }}
version: ${{steps.version.outputs.version }}
build: ${{steps.build.outputs.buildver}}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Unshallow
run: git fetch --prune --unshallow
Expand Down Expand Up @@ -57,12 +58,19 @@ jobs:
version=$(echo "${{steps.current.outputs.tag}}" | cut -dv -f2)
echo "::set-output name=version::$version"
- name: Build Version
id: build
run: |
buildver=$(git describe --tags --match v* | cut -d- -f2)
echo "build = $buildver"
echo "::set-output name=buildver::$buildver"
changelog:
name: Generate Changelog (tags)
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Unshallow
run: git fetch --prune --unshallow
Expand Down Expand Up @@ -118,7 +126,7 @@ jobs:
path: changelog

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v2
Expand All @@ -135,14 +143,15 @@ jobs:
env:
CM_RELEASE: true
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: "0"
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}

- name: Test JAR with GameTest Server
run: ./gradlew runGameTestServer
timeout-minutes: 20
env:
CM_RELEASE: true
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: "0"
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -159,7 +168,7 @@ jobs:
env:
CM_RELEASE: true
CM_SEMVER_VERSION: ${{ needs.vars.outputs.version }}
CM_BUILD_NUM: "0"
CM_BUILD_NUM: ${{ needs.vars.outputs.build }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -257,7 +266,7 @@ jobs:
needs: [changelog, vars, jar]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v2
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ minecraft {
// JetBrains Runtime Hotswap
jvmArg '-XX:+AllowEnhancedClassRedefinition'
jvmArg '-XX:HotswapAgent=fatjar'
} else {
forceExit false
}

forceExit false
Expand Down

0 comments on commit b9d1fdf

Please sign in to comment.