Skip to content

Merge remote-tracking branch 'PlayerSkills/main' #2

Merge remote-tracking branch 'PlayerSkills/main'

Merge remote-tracking branch 'PlayerSkills/main' #2

Workflow file for this run

name: Build and Release
on:
workflow_dispatch:
push:
paths:
- 'src/**/*'
- 'pom.xml'
- '.github/workflows/maven.yml'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Cache Dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
- name: Set up Java Environment
uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'temurin'
cache: 'maven'
- name: Build and Test
run: mvn clean package install
- name: Set outputs
id: short_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Deploy to GitHub Releases
uses: actions/upload-artifact@v2
with:
name: PlayerSkills-${{ steps.short_sha.outputs.sha_short }}
path: target/*.jar
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: target/*.jar
body: |
Commit ${{ steps.short_sha.outputs.sha_short }}
PlayerSkills Automation Compile
name: PlayerSkills Automation Compile ${{ steps.short_sha.outputs.sha_short }}
draft: false
tag_name: commit-${{ steps.short_sha.outputs.sha_short }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }}
GITHUB_REPOSITORY: ItzJustSamu/PlayerSkills