-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 886 Bytes
/
release.yml
File metadata and controls
40 lines (34 loc) · 886 Bytes
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
name: Release
on:
push:
tags:
- '*'
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
cache: maven
server-id: githubl-calculator
settings-path: ${{ github.workspace }}
- name: Set project version from tag
shell: bash
run: |
# Example: v1.2.3 -> 1.2.3
CLEAN_VERSION="${GITHUB_REF_NAME#v}"
mvn -B versions:set -DnewVersion="$CLEAN_VERSION" -DgenerateBackupPoms=false
- name: Publish with Maven
run: mvn -B clean verify
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}