-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
Config refactor and 1.17 update
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# | ||
# CI build that assembles artifacts and runs tests. | ||
# If validation is successful this workflow releases from the main dev branch. | ||
# | ||
# - skipping CI: add [skip ci] to the commit message | ||
# - skipping release: add [skip release] to the commit message | ||
# | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ 'develop', 'release/**' ] | ||
tags-ignore: [ v* ] # release tags are autogenerated after a successful CI, no need to run CI against them | ||
pull_request: | ||
branches: [ '**' ] | ||
|
||
jobs: | ||
|
||
assemble: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '16' | ||
- uses: burrunan/gradle-cache-action@v1 | ||
with: | ||
gradle-distribution-sha-256-sum-warning: false | ||
- name: Assemble | ||
run: ./gradlew assemble | ||
spotless: | ||
needs: assemble | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '16' | ||
- uses: burrunan/gradle-cache-action@v1 | ||
with: | ||
gradle-distribution-sha-256-sum-warning: false | ||
- name: Spotless | ||
run: ./gradlew spotlessCheck | ||
test: | ||
needs: assemble | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '16' | ||
- uses: burrunan/gradle-cache-action@v1 | ||
with: | ||
gradle-distribution-sha-256-sum-warning: false | ||
- name: Test | ||
run: ./gradlew test | ||
|
||
publish: | ||
needs: [ spotless, test ] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
&& github.ref == 'refs/heads/release/mc-1.17.x' | ||
&& github.repository == 'magneticflux-/fabric-mumblelink-mod' | ||
&& !(contains(toJSON(github.event.commits.*.message), '[skip release]') || contains(toJSON(github.event.commits.*.message), '[skip ci]')) | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci | ||
|
||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '16' | ||
|
||
- uses: burrunan/gradle-cache-action@v1 | ||
with: | ||
gradle-distribution-sha-256-sum-warning: false | ||
|
||
- name: Perform release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }} | ||
run: ./gradlew githubRelease publish |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.