-
-
Notifications
You must be signed in to change notification settings - Fork 39
43 lines (37 loc) · 1.17 KB
/
snapshot.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 Snapshot to GitHub
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish, such as 1.3.0-SNAPSHOT'
required: true
default: '1.3.1-SNAPSHOT'
ref:
description: 'The Branch, Tag or SHA to use to publish Snapshot'
required: false
default: 'master'
permissions:
contents: write
packages: write
jobs:
build_snapshot:
name: Build Snapshot
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: Set up Java 21 and set GitHub for publishing in settings.xml
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 21
cache: 'maven'
server-id: github
- name: Compile & Deploy to GitHub Packages
run: mvn -Drevision=${{ github.event.inputs.version }} --no-transfer-progress -B deploy -DdeployAtEnd --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update dependency graph
uses: advanced-security/[email protected]