3.0.0 beta 15 #44
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build_linux: | |
env: | |
beta: ${{contains(github.ref, 'beta')}} | |
runs-on: ubuntu-20.04 | |
steps: | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
submodules: true | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21.0.1' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build -xtest | |
- name: Releasing | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/distributions/jrommanager_*_*.deb, build/distributions/jrommanager-*.*.rpm, build/distributions/JRomManager-*.tar.gz" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
bodyFile: "changelogs/${{ steps.get_version.outputs.version }}.md" | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
name: "v${{ steps.get_version.outputs.version }}" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: JPackage DEB with Gradle | |
run: ./gradlew jpackage -PtargetPlatform=linux-x64 -PinstallerType=deb | |
- name: Releasing DEB | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/installer/*" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: JPackage RPM with Gradle | |
run: ./gradlew jpackage -PtargetPlatform=linux-x64 -PinstallerType=rpm | |
env: | |
JAVA_OPTS: -Dbadass.jlink.jpackage.home=${{env.JDK14}} | |
- name: Releasing RPM | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/installer/*" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: build AppImage | |
run: ./appimage/build.sh | |
- name: Releasing AppImage | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/JRomManager-*.AppImage" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Prepare | |
run: ./prep_docker.sh | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
optyfr/jrommanager | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
- name: Set up QEMU for Docker | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push to Docker Hub | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./build/docker/ | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build_windows: | |
env: | |
beta: ${{contains(github.ref, 'beta')}} | |
needs: build_linux | |
runs-on: windows-latest | |
steps: | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
submodules: true | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21.0.1' | |
- name: JPackage MSI with Gradle | |
run: ./gradlew build jpackage -PtargetPlatform=win -PinstallerType=msi | |
- name: Releasing | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/distributions/JRomManager-*.zip" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Releasing MSI | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/installer/*" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build_macos: | |
env: | |
beta: ${{contains(github.ref, 'beta')}} | |
needs: build_windows | |
runs-on: macos-latest | |
steps: | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
submodules: true | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21.0.1' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: JPackage DMG with Gradle | |
run: ./gradlew jpackage -PtargetPlatform=macos-x64 -PinstallerType=dmg | |
env: | |
JAVA_OPTS: -Dbadass.jlink.jpackage.home=${{env.JDK14}} | |
- name: Releasing DMG | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/installer/*" | |
draft: false | |
prerelease: ${{ env.beta }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |