Skip to content

Commit c508707

Browse files
Merge pull request #299 from com-pas/develop
Release 0.17.0
2 parents a43a33b + 7cd8c45 commit c508707

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/release-project.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Release Project
6+
7+
on:
8+
release:
9+
types: [ released ]
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Extract tag name
22+
id: extract_tagname
23+
shell: bash
24+
# Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
25+
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
26+
27+
- name: Set up JDK 17
28+
uses: actions/setup-java@v3
29+
with:
30+
distribution: 'zulu'
31+
java-version: '17'
32+
33+
- name: Create custom Maven Settings.xml
34+
uses: whelk-io/maven-settings-xml-action@v21
35+
with:
36+
output_file: custom_maven_settings.xml
37+
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
38+
- name: Set version with Maven
39+
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }}
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
- name: Deploy with Maven to GitHub Packages
43+
run: ./mvnw -B -s custom_maven_settings.xml -Prelease clean deploy
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)