Skip to content

Running Build & Release action (triggered by lscgh) #155

Running Build & Release action (triggered by lscgh)

Running Build & Release action (triggered by lscgh) #155

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