Skip to content

things++

things++ #18

Workflow file for this run

name: Build DEV Jars
on: [push, pull_request]
jobs:
build_dev_jars:
name: Build DEV jars
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '21'
- name: Build with Gradle
run: |
chmod 777 gradlew
./gradlew jar
git_hash=$(git rev-parse --short "$GITHUB_SHA")
echo "git_hash=$git_hash" >> $GITHUB_ENV
echo "snapshotVersion=5.5-SNAPSHOT" >> $GITHUB_ENV
echo "artifactPath=$(pwd)/builds" >> $GITHUB_ENV
- name: Upload Plugin jar
uses: actions/upload-artifact@v3
with:
name: AywenCraft-${{ env.git_hash }}.jar
path: ${{ env.artifactPath }}/core-1.0-SNAPSHOT.jar
- name: Create GitHub Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.git_hash }}
release_name: Release ${{ env.git_hash }}
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: ${{ env.artifactPath }}/core-1.0-SNAPSHOT.jar
asset_name: AywenCraft-${{ env.git_hash }}.jar
asset_content_type: application/java-archive