Skip to content

Commit 8a287b6

Browse files
committed
Add logic for extracting build artifacts.
1 parent 669274c commit 8a287b6

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

.github/workflows/maven-pr.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
pull_request:
13+
branches: [ "master" ]
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '17'
26+
distribution: 'temurin'
27+
cache: maven
28+
- name: Set up Maven
29+
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5
30+
with:
31+
maven-version: 3.9.6
32+
- name: Build with Maven
33+
run: "mvn -B package --file pom.xml -DunofficialSuffix=\\'-PR${{ PR_NUMBER }}\\'"
34+
env:
35+
PR_NUMBER: ${{ github.event.number }}
36+
- name: Archive Build Artifacts
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: p2-repository
40+
path: com.wamas.ide.launching.update/target/repository/
41+
retention-days: 7

.github/workflows/maven.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ name: Java CI with Maven
1111
on:
1212
push:
1313
branches: [ "master" ]
14-
pull_request:
15-
branches: [ "master" ]
1614

1715
jobs:
1816
build:
@@ -33,7 +31,8 @@ jobs:
3331
maven-version: 3.9.6
3432
- name: Build with Maven
3533
run: mvn -B package --file pom.xml -DunofficialSuffix=
36-
37-
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
38-
# - name: Update dependency graph
39-
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
34+
- name: Archive Build Artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: p2-repository
38+
path: com.wamas.ide.launching.update/target/repository/

0 commit comments

Comments
 (0)