Skip to content

Commit 0c9f4d6

Browse files
committed
create deploy.yml based on jzarr
1 parent 2c33ca2 commit 0c9f4d6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
10+
- uses: actions/checkout@v3
11+
12+
- name: Set up JDK
13+
uses: actions/setup-java@v3
14+
with:
15+
java-version: '22'
16+
distribution: 'temurin'
17+
server-id: ossrh
18+
server-username: MAVEN_USERNAME
19+
server-password: MAVEN_PASSWORD
20+
21+
- name: Download blosc jar
22+
run: |
23+
mkdir -p ../blosc-java/target
24+
curl https://static.webknossos.org/misc/blosc-java-0.1-1.21.4-SNAPSHOT.jar -o ../blosc-java/target/blosc-java-0.1-1.21.4-SNAPSHOT.jar
25+
26+
- id: install-secret-key
27+
name: Install gpg secret key
28+
run: |
29+
# Install gpg secret key
30+
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
31+
# Verify gpg secret key
32+
gpg --list-secret-keys --keyid-format LONG
33+
34+
- name: Publish package
35+
run: mvn --batch-mode deploy
36+
env:
37+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
38+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 commit comments

Comments
 (0)