You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by bc...@apache.org on 2022/11/18 16:27:58 UTC
[incubator-baremaps] 01/01: Fix release script
This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch 492-release
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 4bc74b71a3b9d0a7f13e7e13c13d3e38d90aa944
Author: Bertil Chapuis <bc...@gmail.com>
AuthorDate: Fri Nov 18 11:51:52 2022 +0100
Fix release script
---
.github/workflows/release.yml | 32 ++++++++++++--------------------
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 592af8f0..2fa522f5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -18,36 +18,28 @@ jobs:
with:
java-version: 17
distribution: temurin
- - name: Build with maven
- run: ./mvnw install -B
- - name: Create Release
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- release_name: Baremaps ${{ github.ref }}
- draft: true
- prerelease: false
- - name: Get version
- id: project
+ - name: Create release
run: |
set -x
- version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
- cd baremaps-cli/target/
+ echo "$GPG_PRIVATE_KEY" | gpg --import --no-tty --batch --yes
+ version=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
+ ./mvnw install -B
+ cd ./baremaps-cli/target/
assets=()
- for asset in "./baremaps-$version-incubating-*"; do
- shasum -a 512 shasum -a 512 "$asset" > "$asset.sha512"
- gpg --batch --yes --detach-sign --armor "$asset"
+ for asset in ./baremaps-$version-incubating-*; do
+ shasum -a 512 "$asset" > "$asset.sha512"
+ gpg --no-tty --pinentry-mode loopback --batch --yes --passphrase "$GPG_PASSPHRASE" --output "$asset.asc" --detach-sign --armor "$asset"
assets+=("-a" "$asset")
assets+=("-a" "$asset.sha512")
assets+=("-a" "$asset.asc")
done
tag_name="${GITHUB_REF##*/}"
- hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
+ hub release create "${assets[@]}" -d -m "Baremaps $tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
+ GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
+
# maven-central:
# name: Release on Maven Central