Skip to content

Commit e42f335

Browse files
committed
Create manual-deploy.yml
Added a maunally triggered workflow for deploying a package to Github Packages.
1 parent ffe5588 commit e42f335

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Manual Maven Deploy Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
VERSION:
7+
description: 'The SemVer version number'
8+
required: true
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
env:
16+
artifact_name: jpt
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: 1.11
24+
server-id: github
25+
26+
- name: Build with Maven
27+
run: mvn -B package --file pom.xml
28+
29+
- name: Update package version
30+
run: mvn versions:set -DnewVersion=${{ github.event.inputs.VERSION }}
31+
32+
- name: Publish to GitHub Packages Apache Maven
33+
run: mvn deploy -PgithubDeploy
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
37+

0 commit comments

Comments
 (0)