Skip to content

changed release action #3

changed release action

changed release action #3

Workflow file for this run

name: Release on GitHub
## Run only when we push a tag. See "docs/release.md" instructions
on:
push:
tags:
- "v*"
env:
evomaster-version: 1.6.2
jdk: 17
retention-days: 1
installer-windows: evomaster-${{env.evomaster-version}}.msi

Check failure on line 14 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release on GitHub

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 14, Col: 22): Unrecognized named-value: 'env'. Located at position 1 within expression: env.evomaster-version .github/workflows/release.yml (Line: 15, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.evomaster-version
installer-osx: evomaster-${{env.evomaster-version}}.dmg
installer-debian: evomaster_${{env.evomaster-version}}-1_amd64.deb
jobs:
build-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
# Don't run any test, as build should had already been verified (and it takes hours...)
run: mvn clean verify -DskipTests
env:
CI_env: GithubAction
- name: Upload evomaster.jar
uses: actions/upload-artifact@v3
with:
name: evomaster.jar
path: core/target/evomaster.jar
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-windows:
needs: build-base
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh WINDOWS
- name: Upload installation file
uses: actions/upload-artifact@v3
with:
name: evomaster.msi
path: release/${{env.installer-windows}}
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-osx:
needs: build-base
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh OSX
- name: Upload installation file
uses: actions/upload-artifact@v3
with:
name: evomaster.dmg
path: release/${{env.installer-osx}}
retention-days: ${{env.retention-days}}
if-no-files-found: error
installer-for-debian:
needs: build-base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: evomaster.jar
path: core/target
- name: Build installation file
shell: bash
run: bash makeExecutable.sh DEBIAN
- name: Upload installation file
uses: actions/upload-artifact@v3
with:
name: evomaster.deb
path: release/${{env.installer-debian}}
retention-days: ${{env.retention-days}}
if-no-files-found: error
tagged-release:
needs: [installer-for-debian,installer-for-windows,installer-for-osx]
name: "Tagged Release"
runs-on: "ubuntu-latest"
steps:
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: evomaster.jar
- name: Download
uses: actions/download-artifact@v3
with:
name: evomaster.deb
- name: Download
uses: actions/download-artifact@v3
with:
name: evomaster.dmg
- name: Download
uses: actions/download-artifact@v3
with:
name: evomaster.msi
## Doesn't seem any longer mantained... plus usability issues
# - uses: "marvinpinto/action-automatic-releases@latest"
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# prerelease: false
# files: |
# evomaster.jar
# ${{env.installer-windows}}
# ${{env.installer-osx}}
# ${{env.installer-debian}}
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
draft: false
fail_on_unmatched_files: true
files: |
evomaster.jar
${{env.installer-windows}}
${{env.installer-osx}}
${{env.installer-debian}}