aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2022-09-01 12:01:50 +0800
committerGlease <4586901+Glease@users.noreply.github.com>2022-09-01 12:40:28 +0800
commit1bc9006d7bbe5c503f36364b2c4dce2a29293e3a (patch)
tree5a6cb5230f93739fee59310b41dbe540c951ce63 /.github/workflows
parentb0698efc456a3dc92a8b7a059b01433d461866e3 (diff)
downloadGT5-Unofficial-1bc9006d7bbe5c503f36364b2c4dce2a29293e3a.tar.gz
GT5-Unofficial-1bc9006d7bbe5c503f36364b2c4dce2a29293e3a.tar.bz2
GT5-Unofficial-1bc9006d7bbe5c503f36364b2c4dce2a29293e3a.zip
add skeleton code
this should be the least common code for all the branches I work on...
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-and-test.yml36
-rw-r--r--.github/workflows/release-latest.yml44
-rw-r--r--.github/workflows/release-tags.yml45
-rw-r--r--.github/workflows/test-scala-presence.yml18
-rw-r--r--.github/workflows/toolchain-compatibility.yml43
5 files changed, 27 insertions, 159 deletions
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 6c9b3cbc6c..3ee2f686fd 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -1,5 +1,3 @@
-# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build and test
@@ -11,35 +9,5 @@ on:
jobs:
build-and-test:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Set up JDK 8
- uses: actions/setup-java@v2
- with:
- java-version: '8'
- distribution: 'adopt'
- cache: gradle
-
- - name: Grant execute permission for gradlew
- run: chmod +x gradlew
-
- - name: Setup the workspace
- run: ./gradlew setupCIWorkspace
-
- - name: Build the mod
- run: ./gradlew build
-
- - name: Run server for 1 minute
- run: |
- mkdir run
- echo "eula=true" > run/eula.txt
- timeout 10 ./gradlew runServer || true
-
- - name: Test no crashes happend
- run: |
- chmod +x .github/scripts/test-no-crash-reports.sh
- .github/scripts/test-no-crash-reports.sh
+ uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
+ secrets: inherit
diff --git a/.github/workflows/release-latest.yml b/.github/workflows/release-latest.yml
deleted file mode 100644
index 5ecccc044f..0000000000
--- a/.github/workflows/release-latest.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
-
-name: Release latest build
-
-on:
- push:
- branches: [ master, main ]
-
-jobs:
- build-and-release:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Set release version
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
-
- - name: Set up JDK 8
- uses: actions/setup-java@v2
- with:
- java-version: '8'
- distribution: 'adopt'
- cache: gradle
-
- - name: Grant execute permission for gradlew
- run: chmod +x gradlew
-
- - name: Setup the workspace
- run: ./gradlew setupCIWorkspace
-
- - name: Build the mod
- run: ./gradlew build
-
- - name: Update latest tag
- uses: "marvinpinto/action-automatic-releases@latest"
- with:
- repo_token: "${{ secrets.GITHUB_TOKEN }}"
- automatic_release_tag: "latest"
- prerelease: false
- title: "Latest build"
- files: build/libs/*.jar
diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml
index 25c354b227..e4c0be6b0d 100644
--- a/.github/workflows/release-tags.yml
+++ b/.github/workflows/release-tags.yml
@@ -1,45 +1,14 @@
-# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release tagged build
on:
push:
- tags:
- - '*'
+ tags: [ '*' ]
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Set release version
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
-
- - name: Set up JDK 8
- uses: actions/setup-java@v2
- with:
- java-version: '8'
- distribution: 'adopt'
- cache: gradle
-
- - name: Grant execute permission for gradlew
- run: chmod +x gradlew
+permissions:
+ contents: write
- - name: Setup the workspace
- run: ./gradlew setupCIWorkspace
-
- - name: Build the mod
- run: ./gradlew build
-
- - name: Release under current tag
- uses: "marvinpinto/action-automatic-releases@latest"
- with:
- repo_token: "${{ secrets.GITHUB_TOKEN }}"
- automatic_release_tag: "${{ env.RELEASE_VERSION }}"
- prerelease: false
- title: "${{ env.RELEASE_VERSION }}"
- files: build/libs/*.jar
+jobs:
+ release-tags:
+ uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
+ secrets: inherit
diff --git a/.github/workflows/test-scala-presence.yml b/.github/workflows/test-scala-presence.yml
new file mode 100644
index 0000000000..6b1091e1fd
--- /dev/null
+++ b/.github/workflows/test-scala-presence.yml
@@ -0,0 +1,18 @@
+name: Test Scala Presence
+
+on:
+ pull_request:
+ branches: [ master, main ]
+ push:
+ branches: [ master, main ]
+
+jobs:
+ test-scala-presence:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Check file content
+ uses: mattsb42-meta/not-grep@1.0.0
+ with:
+ config-file: ./.github/test-scala-presence.toml
diff --git a/.github/workflows/toolchain-compatibility.yml b/.github/workflows/toolchain-compatibility.yml
deleted file mode 100644
index a082bf33ab..0000000000
--- a/.github/workflows/toolchain-compatibility.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
-
-name: Check if toolchain is applied when using differnt java versions
-
-on:
- pull_request:
- branches: [ master, main ]
-
-jobs:
- check-compatibility-with-java-11:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Set up JDK 11
- uses: actions/setup-java@v2
- with:
- java-version: '11'
- distribution: 'adopt'
- cache: gradle
-
- - name: Grant execute permission for gradlew
- run: chmod +x gradlew
-
- - name: Setup the workspace
- run: ./gradlew setupCIWorkspace
-
- - name: Build the mod
- run: ./gradlew build
-
- - name: Run server for 1 minute
- run: |
- mkdir run
- echo "eula=true" > run/eula.txt
- timeout 10 ./gradlew runServer || true
-
- - name: Test no crashes happend
- run: |
- chmod +x .github/scripts/test-no-crash-reports.sh
- .github/scripts/test-no-crash-reports.sh