Skip to content

Running Build & Install action (triggered by lscgh) #33

Running Build & Install action (triggered by lscgh)

Running Build & Install action (triggered by lscgh) #33

name: "Build & Install action"
run-name: "Running Build & Install action (triggered by ${{ github.actor }})"
on: [push]
jobs:
Build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: "Build print"
run: "echo Build"
- name: "Check out"
uses: actions/checkout@v4
- name: "Test maven package"
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 release JAR"
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
Install:
runs-on: ubuntu-latest
steps:
- name: "Install print"
run: "echo Install"