Skip to content

Merge branch 'release-3.7' #6050

Merge branch 'release-3.7'

Merge branch 'release-3.7' #6050

Workflow file for this run

name: Build
on:
push:
branches: [ master, release-3.7 ]
pull_request:
branches: [ master, release-3.7 ]
jobs:
package:
name: Test & Package
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set branch
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release-3.7'
# Checking out a detached head for PR means we have to set the branch
# name for it to show up later; shallow checkout means the branch
# won't exist yet so there's no conflict.
run: git checkout -b ${GITHUB_HEAD_REF}
- name: Store version
id: version
run: echo "VERSION=$(make version-print)" >> $GITHUB_OUTPUT
- name: Update container
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install dos2unix genisoimage ghostscript nsis
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 23
java-package: jdk
- name: Cache Maven packages
uses: actions/cache@v4
id: cache-maven
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Cache packaging dependencies
id: cache-bootstrap
uses: actions/cache@v4
with:
path: |
./dist/dmg
./dist/jdks
./dist/launch4j
./dist/lipo
key: ${{ runner.os }}-bootstrap-${{ hashFiles('bootstrap.sh') }}
- name: Install packaging dependencies
if: steps.cache-bootstrap.outputs.cache-hit != 'true'
run: ./bootstrap.sh
- name: Build packages
run: make release
- name: Archive Linux
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-linux.tar.bz2
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-linux.tar.bz2
- name: Archive MacOS
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-macos-universal.dmg
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-macos-universal.dmg
- name: Archive other
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-other.zip
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-other.zip
- name: Archive Windows x86_64
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_64.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_64.exe
- name: Archive Windows aarch64
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-aarch64.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-aarch64.exe
package_win_x86_32:
name: Test & Package Windows x86_32
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set branch
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release-3.7'
# Checking out a detached head for PR means we have to set the branch
# name for it to show up later; shallow checkout means the branch
# won't exist yet so there's no conflict.
run: git checkout -b ${GITHUB_HEAD_REF}
- name: Store version
id: version
run: echo "VERSION=$(make version-print)" >> $GITHUB_OUTPUT
- name: Update container
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install dos2unix genisoimage ghostscript nsis
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-package: jdk
- name: Cache Maven packages
uses: actions/cache@v4
id: cache-maven
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Cache packaging dependencies
id: cache-bootstrap
uses: actions/cache@v4
with:
path: |
./dist/dmg
./dist/jdks
./dist/launch4j
./dist/lipo
key: ${{ runner.os }}-bootstrap-${{ hashFiles('bootstrap.sh') }}
- name: Install packaging dependencies
if: steps.cache-bootstrap.outputs.cache-hit != 'true'
run: ./bootstrap.sh
- name: Build Windows x86_32
run: make release-windows-x86_32
- name: Archive Windows x86_32
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_32.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_32.exe