Skip to content

Commit

Permalink
mvn-deploy: include all jars; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
lokka30 committed Nov 11, 2024
1 parent ce27753 commit bb1c181
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/mvn-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set JAR filename
id: jar
run: JAR_FILE=$(find target -name '*.jar' -o -name '*.jar' | grep -v 'original'); echo "JAR_FILE=$JAR_FILE" >> $GITHUB_ENV

- name: Upload JAR to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.JAR_FILE }}
asset_name: ${{ github.event.release.tag_name }}.jar
asset_content_type: application/java-archive
- name: Upload JARs to Release
run: |
# Find all .jar files in the target directory and upload them, excluding those with '-original' in the name
for JAR_FILE in target/*.jar; do
if [[ "$JAR_FILE" != *"-original.jar" ]]; then
echo "Uploading $JAR_FILE"
curl -XPOST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @$JAR_FILE \
${{ github.event.release.upload_url }}?name=$(basename $JAR_FILE)
fi
done
4 changes: 2 additions & 2 deletions blackwidowlib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<parent>
<groupId>io.github.arcaneplugins.blackwidow</groupId>
<artifactId>blackwidow</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT-2</version>
</parent>

<artifactId>blackwidowlib</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT-2</version>
<build>
<plugins>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions blackwidowpluginbukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<parent>
<groupId>io.github.arcaneplugins.blackwidow</groupId>
<artifactId>blackwidow</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT-2</version>
</parent>

<artifactId>blackwidowpluginbukkit</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT-2</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
Expand All @@ -47,7 +47,7 @@
<dependency>
<groupId>io.github.arcaneplugins.blackwidow</groupId>
<artifactId>blackwidowlib</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT-2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<groupId>io.github.arcaneplugins.blackwidow</groupId>
<artifactId>blackwidow</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT-2</version>
<packaging>pom</packaging>
<modules>
<module>blackwidowlib</module>
Expand Down

0 comments on commit bb1c181

Please sign in to comment.