for non-main branches CI/CD only runs on pull req
Java CI with Maven / build (pull_request) Successful in 27s
Java CI with Maven / build (pull_request) Successful in 27s
This commit is contained in:
+22
-16
@@ -1,23 +1,29 @@
|
||||
name: Java CI with Maven
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- uses: stCarolas/setup-maven@v5
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
files: ./target/fantasysmp*.jar
|
||||
token: '${{secrets.RELEASE_TOKEN}}'
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "21"
|
||||
distribution: "temurin"
|
||||
cache: maven
|
||||
- uses: stCarolas/setup-maven@v5
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
files: ./target/fantasysmp*.jar
|
||||
token: "${{secrets.RELEASE_TOKEN}}"
|
||||
|
||||
Reference in New Issue
Block a user