Skip to content

Commit

Permalink
Switch from Travis to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kristian committed Feb 5, 2024
1 parent 6e54106 commit 456445f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 12 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Java CI with Maven

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: windows-latest
permissions: write-all

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Determine release version
id: release-version
run: |
echo "VERSION=$(mvn help:evaluate '-Dexpression=project.version' -q -DforceStdout)" >> $env:GITHUB_OUTPUT
- run: mkdir staging && cp target/*.* staging && rm staging/original* && rm staging/*shaded*
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging
- name: Create Tag
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{ steps.release-version.outputs.VERSION }}',
sha: context.sha
})
- name: Release
uses: softprops/action-gh-release@v1
with:
name: JDigitalSimulator v${{ steps.release-version.outputs.VERSION }}
tag_name: ${{ steps.release-version.outputs.VERSION }}
draft: true
files: staging/*
fail_on_unmatched_files: true
2 changes: 0 additions & 2 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
JDigitalSimulator: A platform independent Electronic Design Automation software
===============================================================================

[![Build Status](https://travis-ci.org/kristian/JDigitalSimulator.svg?branch=master)](https://travis-ci.org/kristian/JDigitalSimulator)
[![Build Status](https://github.com/kristian/JDigitalSimulator/actions/workflows/maven.yml/badge.svg)](https://github.com/kristian/JDigitalSimulator/actions/workflows/maven.yml)

JDigitalSimulator is a platform independent open source Electronic Design Automation software entirely written in Java.

Expand Down
22 changes: 13 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<version>2.3.0</version>

<name>JDigitalSimulator</name>
<description>JDigitalSimulator is a plattform independend Electronic Design Automation software entirely build in Java</description>
<organization>
<name>Kristian Kraljic</name>
</organization>
<url>http://kra.lc/projects/jdigitalsimulator/</url>

<developers>
Expand Down Expand Up @@ -35,17 +39,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<version>3.12.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>8</source>
<target>8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -75,7 +79,7 @@
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.1.0</version>
<version>2.3.3</version>
<executions>
<execution>
<id>l4j-clui</id>
Expand All @@ -95,8 +99,8 @@
</classPath>
<icon>src/main/resources/lc/kra/jds/icon.ico</icon>
<jre>
<minVersion>1.7.0</minVersion>
<jdkPreference>preferJre</jdkPreference>
<path>%JAVA_HOME%;%PATH%</path>
<minVersion>1.8.0</minVersion>
<opts>
<opt>-Xss4m</opt>
<opt>--add-opens java.base/java.io=ALL-UNNAMED</opt>
Expand All @@ -106,7 +110,7 @@
<fileVersion>${project.version}.0</fileVersion>
<txtFileVersion>${project.version}.0</txtFileVersion>
<fileDescription>${project.name}</fileDescription>
<copyright>2017 Kristian Kraljic</copyright>
<copyright>2024 Kristian Kraljic</copyright>
<productVersion>${project.version}.0</productVersion>
<txtProductVersion>${project.version}.0</txtProductVersion>
<productName>${project.name}</productName>
Expand All @@ -120,7 +124,7 @@

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<version>3.6.0</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
Expand Down

0 comments on commit 456445f

Please sign in to comment.