Skip to content

Commit 47979ae

Browse files
authored
Changes to integrate bonej-plus-0.0.4 (#369)
bonej-plus 0.0.4 introduces token transfer/refund. Actions build at bonej-plus means that PRs at BoneJ2 can use the latest package build from bonej-plus/master in its CI, while master builds can use the release versions. * Use bonej-plus 0.0.4-SNAPSHOT * PR builds can use bonej-plus snapshots from the Maven package repo. * Use the GitHub package repository * Release bonej-plus-0.0.4
1 parent fdff2f6 commit 47979ae

File tree

3 files changed

+10
-32
lines changed

3 files changed

+10
-32
lines changed

.github/workflows/build-pr.yml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,12 @@ jobs:
1717
java-version: '8'
1818
distribution: 'zulu'
1919
cache: 'maven'
20-
21-
- name: Extract bonej-plus version
22-
id: extract_version
23-
run: |
24-
VERSION=$(grep -A 2 '<artifactId>bonej-plus</artifactId>' ./Modern/wrapperPlugins/pom.xml | grep '<version>' | sed -n 's|.*<version>\(.*\)</version>.*|\1|p')
25-
echo "Found bonej-plus version $VERSION"
26-
echo "bonej_plus_version=$VERSION" >> $GITHUB_ENV
27-
28-
- name: Get bonej-plus asset ID from GitHub Release
29-
id: get_bonej_plus_asset
30-
run: |
31-
ASSET_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.BONEJ_PLUS_REPO }}" \
32-
https://api.github.com/repos/bonej-org/bonej-plus/releases/tags/bonej-plus-${{env.bonej_plus_version}} | \
33-
jq '.assets[] | select(.name=="bonej-plus-${{env.bonej_plus_version}}.jar") | .id')
34-
echo "asset_id=$ASSET_ID" >> $GITHUB_ENV
3520

36-
- name: Download bonej-plus JAR by asset ID
37-
run: |
38-
curl -L \
39-
-H "Authorization: Bearer ${{ secrets.BONEJ_PLUS_REPO }}" \
40-
-H "Accept: application/octet-stream" \
41-
https://api.github.com/repos/bonej-org/bonej-plus/releases/assets/${{ env.asset_id }} \
42-
-o bonej-plus-${{env.bonej_plus_version}}.jar
43-
44-
- name: Install bonej-plus into local Maven repository
45-
run: |
46-
mvn install:install-file \
47-
-Dfile=bonej-plus-${{env.bonej_plus_version}}.jar \
48-
-DgroupId=org.bonej \
49-
-DartifactId=bonej-plus \
50-
-Dversion=${{env.bonej_plus_version}} \
51-
-Dpackaging=jar
21+
- name: Set up Maven settings
22+
uses: s4u/maven-settings-action@v2
23+
with:
24+
servers: '[{"id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.BONEJ_PLUS_REPO }}"}]'
25+
githubServer: false
5226

5327
- name: Set up CI environment
5428
run: .github/setup.sh

Modern/wrapperPlugins/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<dependency>
130130
<groupId>org.bonej</groupId>
131131
<artifactId>bonej-plus</artifactId>
132-
<version>0.0.3</version>
132+
<version>0.0.4</version>
133133
</dependency>
134134

135135
<!-- ImageJ dependencies -->

pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,9 @@
126126
<id>scijava.public</id>
127127
<url>https://maven.scijava.org/content/groups/public</url>
128128
</repository>
129+
<repository>
130+
<id>github</id>
131+
<url>https://maven.pkg.github.com/bonej-org/bonej-plus</url>
132+
</repository>
129133
</repositories>
130134
</project>

0 commit comments

Comments
 (0)