-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.16 KB
/
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
name: Publish package to GitHub Packages
on:
workflow_dispatch:
inputs:
version:
description: "Version name to publish (eg: x.x.x)"
type: string
required: true
jobs:
publish:
timeout-minutes: 15
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: aboutbits/github-actions-java/setup@v3
- name: Set Version
run: sed -i 's|<version>BUILD-SNAPSHOT</version>|<version>${{ github.event.inputs.version }}</version>|g' pom.xml
- name: Publish package
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml --batch-mode deploy
env:
GITHUB_USER_NAME: ${{ github.actor }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag:
timeout-minutes: 5
runs-on: ubuntu-22.04
needs: publish
steps:
- uses: actions/checkout@v4
- name: Tag Deployment
uses: aboutbits/github-actions-base/git-create-or-update-tag@v1
with:
tag-name: ${{ github.event.inputs.version }}
user-name: 'AboutBits'
user-email: '[email protected]'