-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (34 loc) · 1.23 KB
/
release.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
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
actions: read
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 21
- name: Install GitHub CLI
run: |
sudo apt update && sudo apt install gh -y
- name: Publish package capable of targeting H2 in-memory backend
run: |
./mvnw versions:set -DnewVersion=${{ github.event.release.tag_name }} && ./mvnw --batch-mode --update-snapshots -Pproduction,expose-runtime-metadata clean deploy
SUFFIX="${{ github.event.release.tag_name }}"
echo "Uploading cf-hoover-ui-$SUFFIX.jar to release ${{ github.event.release.tag_name }}"
gh release upload "${{ github.event.release.tag_name }}" "/home/runner/.m2/repository/org/cftoolsuite/cfapp/cf-hoover-ui/$SUFFIX/cf-hoover-ui-$SUFFIX.jar" --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}