Recording issues #1133
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: windows-latest | |
permissions: | |
# write permission is required to create a github release | |
contents: write | |
# write permission is required for autolabeler | |
# otherwise, read permission is required at least | |
pull-requests: write | |
steps: | |
- name: Checkout VPin Studio | |
uses: actions/checkout@v3 | |
- name: Checkout Popper Client Repo | |
uses: actions/checkout@v3 | |
with: | |
repository: syd711/vpin-studio-popper-client | |
path: ./vpin-studio-popper-client | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Checkout Popper Client Repo | |
uses: actions/checkout@v3 | |
with: | |
repository: syd711/vpin-mania-rest-client | |
path: ./vpin-mania-rest-client | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
cache: 'maven' | |
- name: Run maven build for vpin mania rest client | |
working-directory: ./vpin-mania-rest-client | |
run: mvn clean install -DskipTests | |
- name: Run maven build for Assets API | |
working-directory: ./vpin-connector-assets | |
run: mvn clean install | |
- name: Run maven build for popper client | |
working-directory: ./vpin-studio-popper-client | |
run: mvn clean install | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Extract Windows Runtime | |
run: | | |
unzip -o java-runtime.zip -d ${{ github.workspace }}/java-runtime | |
- name: List files in the runtime folder | |
run: | | |
ls ${{ github.workspace }}/java-runtime/ | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
- name: List JDK | |
run: | | |
ls "C:\hostedtoolcache\windows\Java_Zulu_jdk\11.0.25-9\x64" | |
- name: Copy .dll | |
run: | | |
copy ${{ github.workspace }}/resources/jvm/jinput-dx8_64.dll "C:\hostedtoolcache\windows\Java_Zulu_jdk\11.0.25-9\x64\bin\" | |
- name: Build with Maven | |
run: mvn --batch-mode --update-snapshots clean package | |
- name: List files in the Output folder | |
run: | | |
ls ${{ github.workspace }}/Output/VPin-Studio/ | |
- name: Set Release Version | |
id: set-release-version | |
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' | |
run: | | |
$version = mvn "--batch-mode" org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate "-Dexpression=project.version" "-q" "-DforceStdout" | |
echo "::set-output name=version::${version}" | |
- name: Draft Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' | |
with: | |
body_path: RELEASE_NOTES.md | |
draft: true | |
tag_name: ${{ steps.set-release-version.outputs.version }} | |
files: | | |
./Output/VPin-Studio/VPin-Studio-Client-Installer*.exe | |
./Output/VPin-Studio/VPin-Studio-Full-Installer*.exe | |
./Output/VPin-Studio/VPin-Studio-Server.zip | |
./Output/VPin-Studio/VPin-Studio.zip | |
./Output/VPin-Studio/VPin-Studio-Client-linux-x64.zip | |
./Output/VPin-Studio/VPin-Studio-Client-macosx_aarch64.zip | |
./Output/VPin-Studio/vpin-studio-ui-jar.zip | |
env: | |
GITHUB_REPOSITORY: https://github.com/syd711/vpin-studio |