File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish snapshot to the Maven Central Repository
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : ["main", "snapshot"]
7+
8+ concurrency :
9+ group : publish-snapshot
10+ cancel-in-progress : true
11+
12+ jobs :
13+ publish-snapshot :
14+ runs-on : ubuntu-latest
15+ services :
16+ s3mock :
17+ image : adobe/s3mock:3.11.0
18+ ports :
19+ - 9090:9090
20+ env :
21+ initialBuckets : zarr-test-bucket
22+ defaults :
23+ run :
24+ shell : bash
25+
26+ steps :
27+ - uses : actions/checkout@v5
28+ with :
29+ submodules : true
30+
31+ - name : Set up JDK
32+ uses : actions/setup-java@v4
33+ with :
34+ java-version : " 11"
35+ distribution : " temurin"
36+ cache : maven
37+
38+ - name : Set up Python
39+ uses : actions/setup-python@v6
40+ with :
41+ python-version : " 3.11"
42+
43+ - name : Install uv
44+ uses : astral-sh/setup-uv@v6
45+
46+ - name : Download testdata
47+ run : |
48+ mkdir testoutput
49+ curl https://static.webknossos.org/data/zarr_v3/l4_sample.zip -o testdata/l4_sample.zip
50+ cd testdata
51+ unzip l4_sample.zip
52+
53+ - name : Set SNAPSHOT version
54+ run : |
55+ BASE=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
56+ BASE=${BASE%-SNAPSHOT}
57+ mvn versions:set -DnewVersion="${BASE}-SNAPSHOT" -DgenerateBackupPoms=false
58+
59+ - name : Publish snapshot
60+ run : |
61+ mkdir -p ~/.m2
62+ echo "<settings><servers><server><id>central</id><username>$MAVEN_USERNAME</username><password>$MAVEN_PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
63+ mvn --batch-mode --no-transfer-progress deploy -DargLine="-Xmx6g" -DrunS3Tests=true -Dgpg.skip=true
64+ env :
65+ MAVEN_OPTS : " -Xmx6g"
66+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
67+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
You can’t perform that action at this time.
0 commit comments