Skip to content

Commit

Permalink
Fine-tune GitHub Actions and versioning (danfickle#14)
Browse files Browse the repository at this point in the history
As it's now, the artifacts from the dev releases overwrite the properly
released ones. Hence, we're switching to using the commit SHA as the
artifact version and release version.

It's also unnecessary and confusing to create proper GitHub releases for
the dev ones, where the point is merely to have the artifacts published
and available for local downstream development.

I don't think we have landed a versioning scheme nor proper release
process, so I'm not sure whether we should stick to using SHA version
for the released versions, but that's more a part of the danfickle#13 discussion.

The flatten plugin is required for using this property-based versioning
in a multi-module project. Without it, the version in the subproject
won't be replaced with the property.
  • Loading branch information
madsop-nav authored Mar 11, 2024
1 parent 1ead4fa commit 41b2b09
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 22 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,7 @@ jobs:
java-version: 17
cache: maven
- name: Upload artifact
run: mvn -B deploy -Dgithub-release -e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: elgohr/Github-Release-Action@v5
with:
title: openhtmltopdf.dev
run: mvn -B deploy -Dgithub-release -e -Drevision=dev-${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -74,7 +67,7 @@ jobs:
java-version: 17
cache: maven
- name: Upload artifact
run: mvn -B deploy -Dgithub-release
run: mvn -B deploy -Dgithub-release -Drevision=${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ target
**/*.releaseBackup
*.releaseBackup
release.properties
**/.flattened-pom.xml
*/.classpath
*/.project
*/.settings
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-java2d/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-java2d</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-latex-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-latex-support</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-mathml-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-mathml-support</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-objects/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-objects</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-pdfa-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-pdfa-testing</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-pdfbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-pdfbox</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-rtl-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-rtl-support</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-slf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-slf4j</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-svg-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-svg-support</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-templates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>
</parent>

<artifactId>openhtmltopdf-templates</artifactId>
Expand Down
27 changes: 26 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>at.datenwort.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.1.5-SNAPSHOT</version>
<version>${revision}</version>

<packaging>pom</packaging>

Expand Down Expand Up @@ -248,10 +248,35 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<properties>
<revision>1.1.5-SNAPSHOT</revision>
<open.batik.version>1.17</open.batik.version>

<!-- Please keep xmlgraphics-commons up to date with batik. -->
Expand Down

0 comments on commit 41b2b09

Please sign in to comment.