Skip to content

Commit

Permalink
Create maven-publish.yml
Browse files Browse the repository at this point in the history
Update Maven-BuildAndRealese.yml

Update Maven-BuildAndRealese.yml

Maven workflow added

Update Maven-BuildAndRealese.yml

Update Maven-BuildAndRealese.yml

Update Maven-BuildAndRealese.yml

- actions/upload-release-asset@v2
  • Loading branch information
MRollin03 committed Sep 24, 2024
1 parent 0974bda commit 93cb744
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Build and Release Minecraft Plugin
name: Build and Release Minecraft Plugin - Maven

on:
push:
tags:
- 'v*.*.*' # Trigger on version tags like v1.0.0, v2.1.3, etc.
- "v*" # Trigger the workflow on new version tags
workflow_dispatch: # Allows manual triggering

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4 # Updated to v4

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4 # Updated to v4
with:
distribution: 'temurin' # Use Temurin JDK (formerly AdoptOpenJDK)
java-version: '17' # Set your desired Java version here
Expand All @@ -23,7 +24,7 @@ jobs:
run: mvn clean package

- name: Archive built jar
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: minecraft-plugin
path: target/*.jar
Expand All @@ -35,10 +36,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4 # Updated to v4

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4 # Updated to v4
with:
distribution: 'temurin'
java-version: '17'
Expand All @@ -58,7 +59,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload plugin jar to release
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@v2 # Updated to v2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/*.jar
Expand Down

0 comments on commit 93cb744

Please sign in to comment.