Skip to content

Allow manually formatting sources via github action #177

Allow manually formatting sources via github action

Allow manually formatting sources via github action #177

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: CI Build
on:
pull_request_target:
branches:
- main
types:
- closed
pull_request:
branches:
- main
workflow_dispatch:
inputs:
force_snapshot_release:
description: 'Update the snapshot release on github'
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Check if a snapshot release should be made
id: snapshot_release
run: echo "::set-output name=should_make::${{ force_snapshot_release || (github.event.pull_request.base.ref == 'main' && github.event.action == 'closed' && github.event.pull_request.merged == true) }}"

Check failure on line 38 in .github/workflows/maven.yml

View workflow run for this annotation

GitHub Actions / CI Build

Invalid workflow file

The workflow is not valid. .github/workflows/maven.yml (Line: 38, Col: 12): Unrecognized named-value: 'force_snapshot_release'. Located at position 1 within expression: force_snapshot_release || (github.event.pull_request.base.ref == 'main' && github.event.action == 'closed' && github.event.pull_request.merged == true)
# configure git
- name: setup git config
run: |
git config user.name ${{ github.actor }}
git config user.email "<>"
- name: Build with Maven
run: mvn -Pzip install
- name: change tag 'snapshot' to current commit
if: ${{ steps.snapshot_release.outputs.should_make == 'true' }}
run: |
git tag -f snapshot
git push -f origin --tags
# Read version changelog
- id: get-changelog
name: Get version changelog
if: ${{ steps.snapshot_release.outputs.should_make == 'true' }}
uses: superfaceai/release-changelog-action@v1
with:
path-to-changelog: CHANGELOG.md
version: ${{ inputs.release_version }}
operation: read
- name: Make Release Body
if: ${{ steps.snapshot_release.outputs.should_make == 'true' }}
run: |
cat src/build/snapshot-release/release-body-header.md > target/release-body.md
echo "# Changes" >> target/release-body.md
echo "${{ steps.get-changelog.outputs.changelog }}" >> target/release-body.md
cat src/build/snapshot-release/release-body-footer.md >> target/release-body.md
# Make github release
- name: Release
uses: softprops/action-gh-release@v2
if: ${{ steps.snapshot_release.outputs.should_make == 'true' }}
with:
name: Latest snapshot release
tag_name: snapshot
body_path: target/release-body.md
files: target/qudt-public-repo-*.zip