Skip to content

Commit 7661833

Browse files
committed
Optimized the workflows (hopefully).
1 parent 2fe52fa commit 7661833

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: build-wf
22
on:
33
pull_request:
44
workflow_call:
5-
inputs:
6-
upload_p2_only:
7-
default: true
8-
required: false
9-
type: boolean
105
jobs:
116
build:
127
strategy:
@@ -29,19 +24,13 @@ jobs:
2924
with:
3025
distribution: 'temurin'
3126
java-version: 17
27+
cache: 'maven'
3228
- name: Build Packages
3329
run: ./mvnw clean package
3430
- name: Store P2 Repository
35-
if: runner.os == 'Linux' && inputs.upload_p2_only
31+
if: runner.os == 'Linux'
3632
uses: actions/upload-artifact@v3
3733
with:
3834
name: p2-jamopp
3935
path: jamopp.p2/target/repository
4036
retention-days: 1
41-
- name: Store All
42-
if: runner.os == 'Linux' && !inputs.upload_p2_only
43-
uses: actions/upload-artifact@v3
44-
with:
45-
name: full-jamopp
46-
path: .
47-
retention-days: 1

.github/workflows/release.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ on:
88
default: '0.0.0'
99
type: string
1010
jobs:
11-
build:
12-
uses: ./.github/workflows/build.yml
13-
with:
14-
upload_p2_only: false
1511
release:
16-
needs: build
1712
runs-on: ubuntu-22.04
1813
steps:
19-
- name: Download P2 Repository
20-
uses: actions/download-artifact@v3
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
- name: Setup JDK
17+
uses: actions/setup-java@v3
2118
with:
22-
name: full-jamopp
23-
path: .
19+
distribution: 'temurin'
20+
java-version: 17
21+
cache: 'maven'
22+
- name: Build Packages (without tests)
23+
run: ./mvnw clean package -Dmaven.test.skip=true
2424
- name: Build Deploy Path
2525
shell: bash
2626
run: echo "DEPLOY_PATH=$( echo '${{ secrets.DEPLOYMENT_REMOTE_TARGET }}/extended-java-model-parser-and-printer' )" >> $GITHUB_ENV
@@ -45,6 +45,7 @@ jobs:
4545
server-password: OSSRH_PASSWORD
4646
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
4747
gpg-passphrase: MAVEN_GPG_PASSPHRASE
48+
cache: 'maven'
4849
- name: Deploy to Apache Maven Central
4950
run: mvn -Pdeploy-mvn-central deploy
5051
env:

0 commit comments

Comments
 (0)