This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch 752-release-automation
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git

commit 0d63fbf028c5aa1a0c3767e0465dcf323fd6ed26
Author: Bertil Chapuis <[email protected]>
AuthorDate: Wed Mar 13 23:19:57 2024 +0100

    Add release workflow
---
 .github/workflows/release.yml | 79 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..d91d7dba
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,79 @@
+name: Release
+
+on:
+  push:
+    tags:
+      - 'v*'
+
+jobs:
+
+  release-github:
+    name: Release on GitHub
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+      - name: Set up Java 17
+        uses: actions/setup-java@v3
+        with:
+          java-version: 17
+          distribution: temurin
+          cache: maven
+      - name: Build with maven
+        run: mvn install -B
+      - name: Extract version
+        run: echo ::set-output name=value::$(mvn -q -Dexec.executable=echo 
-Dexec.args='${project.version}' --non-recursive exec:exec)
+        id: version
+      - name: Show extracted Maven project version
+        run: echo ${{ steps.version.outputs.value }}
+      - 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 ${{ steps.version.outputs.value }}
+          draft: true
+          prerelease: true
+      - name: Upload source release
+        id: upload-release-asset
+        uses: softprops/action-gh-release@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          files: |
+            ./baremaps-cli/target/apache-baremaps-${{ 
steps.version.outputs.value }}-incubating-src.tar.gz
+            ./baremaps-cli/target/apache-baremaps-${{ 
steps.version.outputs.value }}-incubating-bin.tar.gz
+          name: Release ${{ steps.version.outputs.value }}
+          tag_name: ${{ steps.version.outputs.value }}
+          body: Release of apache-baremaps-${{ steps.version.outputs.value 
}}-incubating
+          draft: false
+          prerelease: false
+          overwrite: true
+#  release-maven:
+#    name: Release on Maven Central
+#    runs-on: ubuntu-latest
+#    steps:
+#      - name: Checkout code
+#        uses: actions/checkout@v2
+#        with:
+#          submodules: true
+#      - name: Set up Java 11
+#        uses: actions/setup-java@v2
+#        with:
+#          java-version: 11
+#          distribution: 'adopt'
+#          server-id: maven
+#          server-username: MAVEN_USERNAME
+#          server-password: MAVEN_CENTRAL_TOKEN
+#          gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
+#          gpg-passphrase: MAVEN_GPG_PASSPHRASE
+#      - name: Build with maven
+#        run: mvn package --file pom.xml -P maputnik,release -B
+#      - name: Deploy artifacts
+#        run: mvn deploy -P maputnik,release -B
+#        env:
+#          MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+#          MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
+#          MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

Reply via email to