Skip to content

Switch from Travis to GitHub Actions #4

Switch from Travis to GitHub Actions

Switch from Travis to GitHub Actions #4

Workflow file for this run

name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Set Release version env variable
run: |
echo "RELEASE_VERSION=$(mvn help:evaluate '-Dexpression=project.version' -q -DforceStdout)" >> $env:GITHUB_ENV
- run: mkdir staging && cp target/*.* staging && rm staging/original* && rm staging/*shaded*
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging
- name: Release
uses: softprops/action-gh-release@v1
with:
name: JDigitalSimulator v$env:RELEASE_VERSION
tag_name: $env:RELEASE_VERSION
draft: true
files: staging/*
fail_on_unmatched_files: true