Skip to content

build: Fix Fedora ant build #524

build: Fix Fedora ant build

build: Fix Fedora ant build #524

Workflow file for this run

name: Build
on: push
jobs:
env:
name: Environment consistency checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- id: version
name: Ensure version number is consistent with branch type
run: make version-check
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Build application
run: ./mvnw --batch-mode verify
- name: Re-run integration tests in opaque testing mode
run: ./mvnw --batch-mode verify -DopaqueTesting=true # TODO migrate this to a maven fail-safe execution
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: target/surefire-reports/TEST-*.xml
- name: Upload test reports
uses: actions/upload-artifact@v3
if: always()
with:
name: test-reports
path: |
target/surefire-reports/
- name: Test standalone symly version
run: target/distributions/symly-*-standalone/bin/symly --version
release:
name: Release
# if: startsWith(github.ref, 'refs/heads/release/')
needs: [ env, test ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
# required for jreleaser to properly compare tags and generate the changelog
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- id: read-version
run: |
VERSION=$(make version)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build application
run: ./mvnw --batch-mode verify
- name: Run JReleaser
uses: jreleaser/release-action@v2
with:
version: 1.8.0
arguments: release --dry-run
env:
JRELEASER_PROJECT_VERSION: ${{ steps.read-version.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
out/jreleaser/output.properties
out/jreleaser/trace.log
out/jreleaser/release/CHANGELOG.md
# - id: publish
# env:
# REPO_FEDORA_COPR_SYMLY_USERNAME: loicrouchon
# REPO_FEDORA_COPR_SYMLY_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# REPO_SYMLY_DEBIAN_USERNAME: loicrouchon
# REPO_SYMLY_DEBIAN_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "GitHub CI publisher bot"
# make publish