File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish to Maven Central
2
2
on :
3
+ push :
3
4
release :
4
5
types : [published]
5
6
jobs :
6
7
publish :
8
+ if : github.event_name == 'release' || contains(github.event.head_commit.message, '[release snapshot]')
7
9
runs-on : ubuntu-latest
8
10
steps :
9
11
- uses : actions/checkout@v4
16
18
server-username : MAVEN_CENTRAL_USERNAME
17
19
server-password : MAVEN_CENTRAL_PASSWORD
18
20
- name : Enforce project version ${{ github.event.release.tag_name }}
19
- run : mvn versions:set -B -DnewVersion="$GIT_TAG"
20
- env :
21
- GIT_TAG : ${{ github.event.release.tag_name }}
21
+ if : github.event_name == 'release'
22
+ run : mvn versions:set -B -DnewVersion=${{ github.event.release.tag_name }}
23
+ - name : Verify this is a SNAPSHOT
24
+ if : github.event_name == 'push' && contains(github.event.head_commit.message, '[release snapshot]')
25
+ run : |
26
+ VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
27
+ if [[ "$VERSION" != *-SNAPSHOT ]]; then
28
+ echo "::error file=pom.xml,title=Not a SNAPSHOT::Project version ($VERSION) does not end with -SNAPSHOT"
29
+ exit 1
30
+ fi
22
31
- name : Deploy
23
32
run : mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
24
33
env :
Original file line number Diff line number Diff line change 1
1
name : Publish to GitHub Packages
2
2
on :
3
+ push :
3
4
release :
4
5
types : [published]
5
6
jobs :
6
7
publish :
8
+ if : github.event_name == 'release' || contains(github.event.head_commit.message, '[release snapshot]')
7
9
runs-on : ubuntu-latest
8
10
if : startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
9
11
steps :
14
16
distribution : ' temurin'
15
17
cache : ' maven'
16
18
- name : Enforce project version ${{ github.event.release.tag_name }}
19
+ if : github.event_name == 'release'
17
20
run : mvn versions:set -B -DnewVersion=${{ github.event.release.tag_name }}
21
+ - name : Verify this is a SNAPSHOT
22
+ if : github.event_name == 'push' && contains(github.event.head_commit.message, '[release snapshot]')
23
+ run : |
24
+ VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
25
+ if [[ "$VERSION" != *-SNAPSHOT ]]; then
26
+ echo "::error file=pom.xml,title=Not a SNAPSHOT::Project version ($VERSION) does not end with -SNAPSHOT"
27
+ exit 1
28
+ fi
18
29
- name : Deploy
19
30
run : mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
20
31
env :
Original file line number Diff line number Diff line change 2
2
<modelVersion >4.0.0</modelVersion >
3
3
<groupId >org.cryptomator</groupId >
4
4
<artifactId >cryptolib</artifactId >
5
- <version >2.3.0-SNAPSHOT</version >
5
+ <version >2.3.0-UVF- SNAPSHOT</version >
6
6
<name >Cryptomator Crypto Library</name >
7
7
<description >This library contains all cryptographic functions that are used by Cryptomator.</description >
8
8
<url >https://github.com/cryptomator/cryptolib</url >
You can’t perform that action at this time.
0 commit comments