Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Margouta authored Jul 1, 2024
1 parent 69ca5bd commit 6982e6e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Build DEV Jars

on: [push, pull_request]

jobs:
build_dev_jars:
name: Build DEV jars
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -24,23 +21,20 @@ jobs:
echo "git_hash=$git_hash" >> $GITHUB_ENV
echo "snapshotVersion=5.5-SNAPSHOT" >> $GITHUB_ENV
echo "artifactPath=$(pwd)/builds" >> $GITHUB_ENV
echo "artifactName=AywenCraft-${git_hash}.jar" >> $GITHUB_ENV
- name: Upload Plugin jar
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactName }}
name: AywenCraft-${{ env.git_hash }}.jar
path: ${{ env.artifactPath }}/core-1.0-SNAPSHOT.jar

create_release:
name: Create Release
runs-on: ubuntu-latest
needs: build_dev_jars
if: github.event_name == 'push'
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.artifactName }}
name: AywenCraft-${{ env.git_hash }}.jar
path: ./artifacts
- name: Create GitHub Release
uses: actions/create-release@v1
Expand All @@ -51,12 +45,13 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
generate_release_notes: true
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./artifacts/core-1.0-SNAPSHOT.jar
asset_name: ${{ env.artifactName }}
asset_path: ./artifacts/AywenCraft-${{ env.git_hash }}.jar
asset_name: AywenCraft-${{ env.git_hash }}.jar
asset_content_type: application/java-archive

0 comments on commit 6982e6e

Please sign in to comment.