-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f19823c
commit b9d1fdf
Showing
3 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 }} | ||
|
||
|
@@ -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 | ||
|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters