github actions #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: [push] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '8' | |
cache: gradle | |
- name: Build with Gradle | |
run: gradle -Pversion=${{ github.run_number }} build | |
- name: Move JARs | |
run: mkdir staging && cp build/libs/*.jar staging | |
- name: Create Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
title: Build ${{ github.run_number }} | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
automatic_release_tag: "v${{ github.run_number }}" | |
files: | | |
staging/moosic-${{ github.run_number }}.jar |