Skip to content

Commit

Permalink
Release 5.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nroduit committed Mar 29, 2021
1 parent 948ebc5 commit b13af2f
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build and publish release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
name: Maven Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: main
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build weasis-dicom-tools
run: mvn -B clean install -f main
- name: Extract Maven project version
run: |
cd main
echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
id: project
- name: Checkout mvn-repo repository
uses: actions/checkout@v2
with:
repository: nroduit/mvn-repo
path: mvn-repo
token: ${{ secrets.API_TOKEN_GITHUB }}
- name: Install xmlstarlet
run: sudo apt-get install xmlstarlet
- name: Commit the maven packages
run: |
cd mvn-repo
REPO=$(pwd)
PKGFOLDER="org/weasis/weasis-dicom-tools"
TAG_VERSION=${{ steps.project.outputs.version }}
F_META="maven-metadata.xml"
cd ~/.m2/repository/${PKGFOLDER}
find . -name "*.jar" -o -name "*.pom" | cpio -updm ${REPO}/${PKGFOLDER}
cd ${REPO}/${PKGFOLDER}
xmlstarlet ed --inplace -u "//metadata/version" -v ${TAG_VERSION} -u "//metadata/versioning/release" -v ${TAG_VERSION} \
-u "//metadata/versioning/lastUpdated" -v $(date "+%Y%m%d%H%M%S") ${F_META}
IFS=$'\n'
versions=$(xmlstarlet sel -t -m "//metadata/versioning/versions" -v version ${F_META})
if printf '%s\n' "${versions[@]}" | grep -q -P "^${TAG_VERSION}$"; then
:
else
xmlstarlet ed --inplace -s "//metadata/versioning/versions" -t elem -n "version" -v ${TAG_VERSION} ${F_META}
fi
paths=($(find . -name "*.jar" -o -name "*.pom" -o -name "${F_META}"))
for file in ${paths[@]}; do
$(sha1sum "${file}" | awk '{printf $1}' > "${file}".sha1)
$(md5sum "${file}" | awk '{printf $1}' > "${file}".md5)
done
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Add weasis-dicom-tools release"
git push
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<artifactId>weasis-dicom-tools</artifactId>
<packaging>jar</packaging>
<name>Weasis DICOM API (based on dcm4che3)</name>
<version>5.23.1</version>
<version>5.23.2</version>

<properties>
<java-version>1.8</java-version>
<enforcer.jdk-version>[${java-version},)</enforcer.jdk-version>
<enforcer.maven-version>[3.0.5,)</enforcer.maven-version>
<dcm4che.version>5.23.1</dcm4che.version>
<dcm4che.version>5.23.2</dcm4che.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.projectKey>weasis-dicom-tools</sonar.projectKey>
Expand Down

0 comments on commit b13af2f

Please sign in to comment.