Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
name: Publish to Maven Central

on:
workflow_dispatch:
release:
types: [ created ]

jobs:
publish:
name: Publish
name: Publish to Maven Central
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
java-version: '21'
distribution: corretto
server-id: central
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Set version
run: mvn versions:set -DnewVersion="${REF_NAME:1}"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install test file generator requirements
run: |
pip install -r test-requirements.txt

- name: Locate Python
id: locate-python
run: echo "python-path=$(which python)" >> "$GITHUB_OUTPUT"

- name: Set version from release tag
run: mvn versions:set -DnewVersion="${REF_NAME#v}"
env:
REF_NAME: ${{ github.ref_name }}

- name: Publish
run: mvn --batch-mode deploy -DskipTests=true
run: mvn --batch-mode deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
ASDF_JAVA_TESTS_PYTHON_PATH: ${{ steps.locate-python.outputs.python-path }}
SERVER_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
SERVER_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
10 changes: 5 additions & 5 deletions aggregate-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>asdf</artifactId>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<version>${revision}</version>
</parent>

Expand All @@ -17,22 +17,22 @@

<dependencies>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-compression-blosc</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-compression-commons-compress</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-compression-zstd</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-core</artifactId>
<version>${revision}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions asdf-compression-blosc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>asdf</artifactId>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<version>${revision}</version>
</parent>

Expand All @@ -14,7 +14,7 @@

<dependencies>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-core</artifactId>
<version>${revision}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions asdf-compression-commons-compress/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>asdf</artifactId>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<version>${revision}</version>
</parent>

Expand All @@ -14,7 +14,7 @@

<dependencies>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-core</artifactId>
<version>${revision}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions asdf-compression-zstd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>asdf</artifactId>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<version>${revision}</version>
</parent>

Expand All @@ -14,7 +14,7 @@

<dependencies>
<dependency>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf-core</artifactId>
<version>${revision}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion asdf-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>asdf</artifactId>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<version>${revision}</version>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.asdfformat</groupId>
<groupId>org.asdf-format</groupId>
<artifactId>asdf</artifactId>
<version>${revision}</version>

Expand Down Expand Up @@ -49,7 +49,7 @@
<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
<central-publishing-plugin.version>0.7.0</central-publishing-plugin.version>
<junit.version>5.11.4</junit.version>
Expand Down
2 changes: 2 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
asdf
numpy