-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (55 loc) · 1.96 KB
/
deploy.yml
File metadata and controls
57 lines (55 loc) · 1.96 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy Maven Central
concurrency:
group: deploy-master
cancel-in-progress: false
on:
push:
branches:
- master
env:
JFROG_USER: ${{ secrets.ARTIFACTORY_AUTH_USER }}
JFROG_PASS: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }}
SONATYPE_GPG_KEY_BASE64: ${{ secrets.SONATYPE_GPG_KEY_BASE64 }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_GPG_KEY_PASSWORD: ${{ secrets.SONATYPE_GPG_KEY_PASSWORD }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
jobs:
maven-package:
if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'ci skip')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Copy maven settings
run: |
wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml
- uses: actions/setup-java@v5
with:
java-version: 17.0.13
distribution: liberica
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Run maven build
run: mvn package -s .github/workflows/settings.xml -PprettierCheck -Dprettier.nodePath=node -Dprettier.npmPath=npm
- name: Upload artifact
uses: actions/[email protected]
with:
path: gbfs-validator-java/target/*.jar
publish-release:
if: github.repository_owner == 'entur' && github.event_name == 'push'
name: Publish release to maven central
uses: entur/gha-maven-central/.github/workflows/maven-publish.yml@v1
secrets: inherit
with:
push_to_repo: true
snapshot: false
next_version: ''