forked from chris-armstrong/felix-eclipse
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 3.16 KB
/
maven-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#########################################################################################################################
#
# __ __ _____ _ _ _ _
# | \/ | | __ \ | | | (_) | |
# | \ / | __ ___ _____ _ __ | |__) | _| |__ | |_ ___| |__
# | |\/| |/ _` \ \ / / _ \ '_ \ | ___/ | | | '_ \| | / __| '_ \
# | | | | (_| |\ V / __/ | | | | | | |_| | |_) | | \__ \ | | |
# |_| |_|\__,_| \_/ \___|_| |_| |_| \__,_|_.__/|_|_|___/_| |_|
#
#
# http://www.patorjk.com/software/taag/#p=display&f=Big&t=maven-publish
#
#########################################################################################################################
#
# maven-publish.yml
#
# This workflow will build a package using Maven and then publish it to GitHub packages
# For more information see:
#
# GitHub Packages
# https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages
# https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
# GitHub packages
# https://docs.github.com/en/billing/managing-billing-for-github-packages/about-billing-for-github-packages
name: Maven Package
#
# on event "workflow_dispatch" => manual running
#
# To trigger the workflow_dispatch event, your workflow must be in the default branch.
# => https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
# => https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
#
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17' # as the embeded jvm embeded in Eclipse 2021/12
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
# -B, --batch-mode : Run in non-interactive (batch) mode (disables output color)
# -f, --file <file> : Force the use of an alternate POM file (or directory with pom.xml)
# clean - lifecycle handles project cleaning
# verify - run any checks on results of integration tests to ensure quality criteria are met
#
- name: Build with Maven
run: mvn -B clean verify --file au.com.forge.felix.eclipse.builder/pom.xml
# -B, --batch-mode : Run in non-interactive (batch) mode (disables output color)
# -f, --file <file> : Force the use of an alternate POM file (or directory with pom.xml)
# deploy - done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.
#
- name: Publish to GitHub Packages Apache Maven
run: mvn -B deploy -s $GITHUB_WORKSPACE/au.com.forge.felix.eclipse.builder/settings.xml --file au.com.forge.felix.eclipse.builder/pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}