Skip to content

workflow

workflow #6

Workflow file for this run

name: Build Workflow
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build with Maven
run: mvn package
- name: Install Launch4j using Chocolatey
run: |
choco install launch4j -y
- name: Run Launch4j
run: |
"C:\Program Files (x86)\Launch4j\launch4j.exe" MDCstudentSIMULATOR/launch4j.xml
shell: bash
- name: Upload EXE artifact
uses: actions/upload-artifact@v2
with:
name: MDCstudentSIMULATOR_executable
path: target/MDCstudentSIMULATOR.exe
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: "Release ${{ github.ref_name }}"
body: "Release created by GitHub Actions"
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/MDCstudentSIMULATOR.exe
asset_name: MDCstudentSIMULATOR.exe
asset_content_type: application/octet-stream