split workflows to only release on main branches

This commit is contained in:
Telan committed 2021-11-12 20:08:40 +02:00
1 parent b49c99b008
commit 62988f1c0a
4 files changed
+65 -25

No files matched your search

@@ -0,0 +1,26 @@
# This workflow only meant for the source mod you shouldn't bring it into your own project
name: Buildscript maintenance
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
buildscript-maintenance:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: setup git config
run: |
git config user.name "GitHub CI Bot"
git config user.email "<>"
- name: Ensure build script version is up to date
run: .github/scripts/update-version.sh
@@ -1,30 +1,12 @@
# This workflow only meant for the source mod you shouldn't bring it into your own project
name: Repository specific CI
name: Release packages
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
buildscript-maintenance:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: setup git config
run: |
git config user.name "GitHub CI Bot"
git config user.email "<>"
- name: Ensure build script version is up to date
run: .github/scripts/update-version.sh
zip-packages:
runs-on: ubuntu-latest
steps:
@@ -40,7 +22,8 @@ jobs:
-x "*.git/*" \
\
-x ".github/scripts/update-version.sh" \
-x ".github/workflows/repository-specific.yml" \
-x ".github/workflows/buildscript-maintenance.yml" \
-x ".github/workflows/package-release.yml" \
\
-x "*docs/*" \
-x "LICENSE" \
@@ -67,7 +50,8 @@ jobs:
-x "*.git/*" \
\
-x ".github/scripts/update-version.sh" \
-x ".github/workflows/repository-specific.yml" \
-x ".github/workflows/buildscript-maintenance.yml" \
-x ".github/workflows/package-release.yml" \
\
-x "*docs/*" \
-x "*src/*" \
@@ -76,7 +60,7 @@ jobs:
\
-x "starter.zip" \
-x "migration.zip"
- name: Publish migration package
uses: "marvinpinto/action-automatic-releases@latest"
with:
+32
View File
@@ -0,0 +1,32 @@
# 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 pull request
on:
pull_request:
branches: [ master, main ]
jobs:
build:
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
@@ -1,13 +1,11 @@
# 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: Java CI with Gradle
name: Build and release main branch
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
build: