Update dependency pl.project13.maven:git-commit-id-plugin to v4.9.10 #6332
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: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
- stage | |
jobs: | |
non_module_java: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
java: [ '8' ] | |
architecture: [ 'x64', 'x86' ] | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }} with ${{ matrix.os }} | |
steps: | |
- name: Prepare git | |
run: git config --global core.autocrlf false | |
- name: Checkout repository | |
uses: actions/checkout@master | |
with: | |
submodules: "recursive" | |
fetch-depth: 2 | |
- name: Setup JDK ${{ matrix.java }} | |
uses: actions/setup-java@v1 | |
with: | |
java-package: jdk | |
java-version: ${{ matrix.java }} | |
architecture: ${{ matrix.architecture }} | |
- name: Build project | |
run: | | |
zip --junk-paths document-generator-ws README.md | |
- name: Create checksum | |
run: echo ${{ github.sha }} > checksum.txt | |
- name: Version number | |
id: version_number | |
run: | | |
if [ ${{ startsWith(github.ref, 'refs/tags/') }} = true ]; then | |
VERSION=$(basename ${{ github.ref }}) | |
else | |
VERSION=ci-latest-$(basename ${{ github.ref }}) | |
PREV_RELEASE=$(curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$VERSION | jq -r .url) | |
# Reset ci-latest tag | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github CI" | |
# Workaround for "could not read Username for 'https://github.com': No such device or address" | |
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git | |
git tag -d $VERSION || true | |
git push origin :$VERSION || true | |
git tag -m $VERSION $VERSION | |
git push --tags | |
fi | |
echo "##[set-output name=version;]$VERSION" | |
echo "##[set-output name=prev_release;]${PREV_RELEASE/null/}" | |
env: | |
# This token is provided by Actions, you do not need to create your own token. | |
# The token is only valid for one hour. | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
timeout-minutes: 20 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.version_number.outputs.version }} | |
release_name: ${{ github.ref }} | |
files: | | |
checksum.txt | |
LICENSE | |
README.md | |
body: | | |
Changes in this Release | |
- Updates on WebDocs MicroService API | |
draft: true | |
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./document-generator-ws.zip | |
asset_name: document-generator-ws.zip | |
asset_content_type: application/zip | |
# - name: Delete previous release | |
# run: | | |
# curl -s -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
# -X DELETE ${{ steps.version_number.outputs.prev_release }} | |
# if: steps.version_number.outputs.prev_release != '' | |
module_java: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
java: [ '11', '12', '13', '14', '15-ea', '16-ea' ] | |
architecture: [ 'x64', 'x86' ] | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }} with ${{ matrix.os }} | |
steps: | |
- name: Prepare git | |
run: git config --global core.autocrlf false | |
- name: Checkout repository | |
uses: actions/checkout@master | |
with: | |
submodules: "recursive" | |
fetch-depth: 2 | |
- name: Setup JDK ${{ matrix.java }} | |
uses: actions/setup-java@v1 | |
with: | |
java-package: jdk | |
java-version: ${{ matrix.java }} | |
architecture: ${{ matrix.architecture }} | |
- name: Build project | |
run: | | |
zip --junk-paths document-generator-ws README.md | |
- name: Create checksum | |
run: echo ${{ github.sha }} > checksum.txt | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
timeout-minutes: 20 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
files: | | |
checksum.txt | |
LICENSE | |
README.md | |
body: | | |
Changes in this Release | |
- Updates on WebDocs MicroService API | |
draft: true | |
prerelease: false | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./document-generator-ws.zip | |
asset_name: document-generator-ws.zip | |
asset_content_type: application/zip |