-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (34 loc) · 1.1 KB
/
release-project.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
# SPDX-FileCopyrightText: 2022 RTE FRANCE
#
# SPDX-License-Identifier: Apache-2.0
name: Release Project
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v21
with:
output_file: custom_maven_settings.xml
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
- name: Set version with Maven
run: mvn -B versions:set -DprocessAllModules=true -DnewVersion=${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy with Maven to GitHub Packages
run: mvn --batch-mode -s custom_maven_settings.xml clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}