-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (38 loc) · 1.19 KB
/
publish-action-artifact.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
name: Publish action artifact to GitHub Maven package
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
jobs:
build-and-push-action:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
maven.pkg.github.com:443
repo.maven.apache.org:443
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Build and publish action to Maven repository
shell: bash
run: |
cd github_action && mvn -B clean deploy -Dquarkus.package.type=uber-jar --update-snapshots -Dquarkus.package.add-runner-suffix=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}