Skip to content

[WIP] Prevent premature closure of input streams #84

[WIP] Prevent premature closure of input streams

[WIP] Prevent premature closure of input streams #84

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: CI
on:
push:
paths-ignore:
- LICENSE
- README.md
- .gitignore
- .gitattributes
branches:
- master
tags:
- v*
pull_request:
paths-ignore:
- LICENSE
- README.md
- .gitignore
- .gitattributes
branches:
- master
jobs:
build:
name: Build and test on ${{ matrix.os }} with Java ${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
java:
- 17
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true
cache: maven
- name: Build with Maven
run: >
mvn
--show-version
--batch-mode
--file pom.xml
clean
compile
test-compile
-U
- name: Verify with Maven
run: >
mvn
--show-version
--batch-mode
--file pom.xml
verify
-U
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: maven
- name: Build package
run: >
mvn
--show-version
--batch-mode
--file pom.xml
package
-DskipTests
- name: Generate compressed artifacts
shell: bash
run: |
set -euo pipefail
mkdir -p build
for i in */target/*-jar-with-dependencies.jar; do
name="DATROMTool-$(basename "$(echo "${i}" | sed -E 's/(DATROMTool-)?(.+)-jar-with-dependencies\.jar/\2/')")"
mv "${i}" "build/${name}.jar"
done
cd build
for i in *.jar; do
name="$(echo "${i}" | sed -E 's/\.jar//')"
zip -j "${name}.zip" "${name}.jar" "../LICENSE" "../README.md"
done
- name: Create an automatic release
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(github.ref, '-rc') }}
files: build/*.zip