Skip to content

Commit 1c03b7b

Browse files
committed
[ci skip] Migrate github actions to GTNH-Actions-Workflows
1 parent 5096647 commit 1c03b7b

File tree

3 files changed

+9
-87
lines changed

3 files changed

+9
-87
lines changed

.github/scripts/test-no-crash-reports.sh

-9
This file was deleted.

.github/workflows/build-and-test.yml

+2-34
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
31

42
name: Build and test
53

@@ -11,35 +9,5 @@ on:
119

1210
jobs:
1311
build-and-test:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
with:
18-
fetch-depth: 0
19-
20-
- name: Set up JDK 8
21-
uses: actions/setup-java@v2
22-
with:
23-
java-version: '8'
24-
distribution: 'adopt'
25-
cache: gradle
26-
27-
- name: Grant execute permission for gradlew
28-
run: chmod +x gradlew
29-
30-
- name: Setup the workspace
31-
run: ./gradlew setupCIWorkspace
32-
33-
- name: Build the mod
34-
run: ./gradlew build
35-
36-
- name: Run server for 1 minute
37-
run: |
38-
mkdir run
39-
echo "eula=true" > run/eula.txt
40-
timeout 10 ./gradlew runServer || true
41-
42-
- name: Test no crashes happend
43-
run: |
44-
chmod +x .github/scripts/test-no-crash-reports.sh
45-
.github/scripts/test-no-crash-reports.sh
12+
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
13+
secrets: inherit

.github/workflows/release-tags.yml

+7-44
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,14 @@
1-
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
31

42
name: Release tagged build
53

64
on:
75
push:
8-
tags:
9-
- '*'
6+
tags: [ '*' ]
107

11-
jobs:
12-
build:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v2
16-
with:
17-
fetch-depth: 0
18-
19-
- name: Set release version
20-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
21-
22-
- name: Set up JDK 8
23-
uses: actions/setup-java@v2
24-
with:
25-
java-version: '8'
26-
distribution: 'adopt'
27-
cache: gradle
28-
29-
- name: Grant execute permission for gradlew
30-
run: chmod +x gradlew
8+
permissions:
9+
contents: write
3110

32-
- name: Setup the workspace
33-
run: ./gradlew setupCIWorkspace
34-
35-
- name: Build the mod
36-
run: ./gradlew build
37-
38-
- name: Release under current tag
39-
uses: "marvinpinto/action-automatic-releases@latest"
40-
with:
41-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
42-
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
43-
prerelease: false
44-
title: "${{ env.RELEASE_VERSION }}"
45-
files: build/libs/*.jar
46-
47-
- name: Publish to Maven
48-
run: ./gradlew publish
49-
env:
50-
MAVEN_USER: ${{ secrets.MAVEN_USER }}
51-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
11+
jobs:
12+
release-tags:
13+
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
14+
secrets: inherit

0 commit comments

Comments
 (0)