Skip to content

Commit

Permalink
Add bash script to release doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-muller666 committed Jul 27, 2024
1 parent 2af9843 commit f0b6072
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
tag_name: ${{ needs.build-application.outputs.VERSION_TAG }}
release_name: Release ${{ needs.build-application.outputs.PROJECT_VERSION }}
body: |
# Installation
To manually install the JAR file included in this release, use the following Maven command:
```sh
Expand All @@ -155,6 +156,42 @@ jobs:
```
Ensure to replace the placeholders with the actual path to the downloaded JAR file and the release pom file.
Alternatively, run the following bash script to download and install the JAR file:
```sh
#!/bin/bash
# URLs for jar and pom files
JAR_URL=https://github.com/acntech/easycontainers/releases/download/${{ needs.build-application.outputs.VERSION_TAG }}/easycontainers-${{ needs.build-application.outputs.PROJECT_VERSION }}.jar
POM_URL=https://github.com/acntech/easycontainers/releases/download/${{ needs.build-application.outputs.VERSION_TAG }}/pom.xml
# Create a temporary directory
TEMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
# File paths
JAR_FILE_PATH=$TEMP_DIR/easycontainers-${{ needs.build-application.outputs.PROJECT_VERSION }}.jar
POM_FILE_PATH=$TEMP_DIR/pom.xml
# Download jar and pom files
curl -L -o $JAR_FILE_PATH $JAR_URL
curl -L -o $POM_FILE_PATH $POM_URL
echo "Jar and POM files downloaded to $TEMP_DIR"
# Maven install command
mvn install:install-file \
-Dfile=$JAR_FILE_PATH \
-DgroupId=no.acntech.easycontainers \
-DartifactId=easycontainers \
-Dversion=0.1.3 \
-Dpackaging=jar \
-DpomFile=$POM_FILE_PATH
# Delete the temporary directory
rm -r $TEMP_DIR
```
# Gradle/Maven Dependency
For Gradle, add this to your `build.gradle` file's dependencies block:
```groovy
implementation 'no.acntech.easycontainers:easycontainers:${{ needs.build-application.outputs.PROJECT_VERSION }}'
Expand Down

0 comments on commit f0b6072

Please sign in to comment.