Running Build & Release action (triggered by lscgh) #155
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 & Release action" | |
run-name: "Running Build & Release action (triggered by ${{ github.actor }})" | |
on: [push] | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: "Check out" | |
uses: actions/checkout@v4 | |
- name: "Run Maven package (including tests)" | |
run: "cd mavenmcserver; mvn package" | |
- name: "Create release" | |
uses: actions/create-release@v1 | |
id: create-release | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
draft: false | |
prerelease: false | |
tag_name: "${{ github.run_number }}" | |
release_name: "Release ${{ github.run_number }}" | |
body: | | |
Automatically generated after push | |
- name: "Upload JAR file to release" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
upload_url: "${{ steps.create-release.outputs.upload_url }}" | |
asset_path: "./mavenmcserver/target/mavenmcserver-0.0.1-SNAPSHOT.jar" | |
asset_name: "mavenmcserver-0.0.1-SNAPSHOT.jar" | |
asset_content_type: application/java-archive | |