diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c9185252..d72a01da 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -50,11 +50,13 @@ jobs:
with:
path: artifacts
- name: Merge artifacts
+ id: merge
run: |
+ rm -rf tmp JVips.jar
mkdir tmp
- (cd tmp; unzip -uo ../artifacts/jar-macos/JVips.jar)
- (cd tmp; unzip -uo ../artifacts/jar-linux-windows/JVips.jar)
- jar -cvf JVips.jar -C tmp .
+ (cd tmp; for jar in ../artifacts/*/JVips.jar; do unzip -uo $jar; done)
+ jar -cvMf JVips.jar -C tmp .
+ echo ::set-output name=jar_version::$(grep 'Implementation-Version' tmp/META-INF/MANIFEST.MF | cut -d ':' -f2)
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
@@ -66,8 +68,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: latest
- release_name: Latest
+ tag_name: ${{ steps.merge.outputs.jar_version }}
+ release_name: ${{ steps.merge.outputs.jar_version }}
draft: false
prerelease: false
- name: Upload release asset
diff --git a/build.sh b/build.sh
index 1bc37f4e..59b071cc 100755
--- a/build.sh
+++ b/build.sh
@@ -158,8 +158,12 @@ if [ ${BUILD_MACOS} -gt 0 ]; then
popd
fi
+source lib/variables.sh
+VERSION="$VIPS_VERSION-$(git rev-parse --short HEAD)"
+mvn ${MAVEN_ARGS} -DnewVersion=$VERSION versions:set
mvn ${MAVEN_ARGS} -DskipTests clean package
+mvn ${MAVEN_ARGS} versions:revert
if [ ${RUN_TEST} -gt 0 ]; then
mvn ${MAVEN_ARGS} surefire:test@utest
diff --git a/pom.xml b/pom.xml
index 97b0861c..7a77bfe8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
JVips
JVips
- 1.0.1
+ 0.0.0-SNAPSHOT
all
@@ -73,8 +73,18 @@
${project.basedir}
JVips
+
+
+ true
+
+
+
+ org.codehaus.mojo
+ versions-maven-plugin
+ 2.7
+
org.apache.maven.plugins
maven-surefire-plugin