Skip to content

Commit 675072c

Browse files
committed
add maven release workflow
1 parent 3f240a2 commit 675072c

File tree

14 files changed

+778
-0
lines changed

14 files changed

+778
-0
lines changed

.github/workflows/release.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,27 @@ jobs:
6262
env:
6363
RUST_BACKTRACE: 1
6464
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
65+
66+
release_maven:
67+
runs-on: ubuntu-latest
68+
if: "startsWith(github.ref, 'refs/tags/testutils/java/v')"
69+
steps:
70+
- uses: actions/checkout@v4
71+
- uses: actions/setup-java@v4
72+
with:
73+
java-version: '11'
74+
distribution: 'temurin'
75+
server-id: 'central'
76+
server-username: MAVEN_USERNAME
77+
server-password: MAVEN_CENTRAL_TOKEN
78+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
79+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
80+
81+
- name: Publish to Apache Maven Central
82+
working-directory: testutils/java
83+
env:
84+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
85+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
86+
MAVEN_GPG_PASSPHRASE: ""
87+
run:
88+
./mvnw clean deploy -DskipTests=true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ go.work
1010
go.work.sum
1111
misc/*.gif
1212
misc/questions.json
13+
14+
testutils/java/target/
15+
testutils/java/.idea/

.goreleaser.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
before:
22
hooks:
33
- go mod tidy
4+
- go generate ./...
45
- ./scripts/completions.sh
56
builds:
67
- env:
@@ -12,6 +13,9 @@ builds:
1213
goarch:
1314
- amd64
1415
- arm64
16+
ignore:
17+
- goos: linux
18+
goarch: arm64
1519
flags:
1620
- -v
1721
- -trimpath

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ release-pypi:
1313
release-cargo:
1414
git tag -a $(shell svu patch --prefix 'testutils/rust/')
1515
git push --tags
16+
17+
release-maven:
18+
git tag -a $(shell svu patch --prefix 'testutils/java/')
19+
git push --tags
61.1 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

testutils/java/Note.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# mvn wrapper
2+
3+
mvn wraper:wraper
4+
5+
# GPG keys
6+
7+
gpg --full-generate-key
8+
gpg --list-secret-keys --keyid-format=long
9+
gpg --list-signatures --keyid-format 0xshort
10+
gpg --keyserver keyserver.ubuntu.com --send-keys 48B96ED2

testutils/java/embed.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package java
2+
3+
import (
4+
"embed"
5+
)
6+
7+
//go:embed mvnw mvnw.cmd .mvn
8+
var MvnWrapper embed.FS

0 commit comments

Comments
 (0)