Skip to content

Commit

Permalink
trying to improve automation of release
Browse files Browse the repository at this point in the history
  • Loading branch information
arcuri82 committed Oct 11, 2023
1 parent aacc1b1 commit 38614e6
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI

on: [push]
on:
push:
tags-ignore:
- '**'

env:
evomaster-version: 1.6.2
Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Release on GitHub

on:
push:
tags:
- "v*"

env:
evomaster-version: 1.6.2
jdk: 17
retention-days: 1



jobs:

build-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean verify -DskipTests
env:
CI_env: GithubAction
- name: Upload evomaster.jar
uses: actions/upload-artifact@v2
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@v2
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
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@v2
with:
name: evomaster.msi
path: release/evomaster-${{env.evomaster-version}}.msi
retention-days: ${{env.retention-days}}
if-no-files-found: error

installer-for-osx:
needs: build-base
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
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@v2
with:
name: evomaster.dmg
path: release/evomaster-${{env.evomaster-version}}.dmg
retention-days: ${{env.retention-days}}
if-no-files-found: error

installer-for-debian:
needs: build-base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK ${{env.jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
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@v2
with:
name: evomaster.deb
path: release/evomaster_${{env.evomaster-version}}-1_amd64.deb
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@v2
with:
name: evomaster.jar
- name: Download
uses: actions/download-artifact@v2
with:
name: evomaster.deb
- name: Download
uses: actions/download-artifact@v2
with:
name: evomaster.dmg
- name: Download
uses: actions/download-artifact@v2
with:
name: evomaster.msi


- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
evomaster.jar
evomaster.deb
evomaster.dmg
evomaster.msi
1 change: 1 addition & 0 deletions version.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def replaceInCI():
regex = re.compile(r' evomaster-version:.*')
replacement = ' evomaster-version: '+reducedVersion+'\n'
replace(".github/workflows/ci.yml", regex, replacement)
replace(".github/workflows/release.yml", regex, replacement)

def replaceInJS():
regex = re.compile(r'\s*"version"\s*:.*')
Expand Down

0 comments on commit 38614e6

Please sign in to comment.