Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

chore: Configure Renovate #5

chore: Configure Renovate

chore: Configure Renovate #5

Workflow file for this run

name: build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
steps:
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2.4.2
- name: Set up JDK 17
uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf # renovate: tag=v2.5.0
with:
java-version: 17
distribution: 'adopt'
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # renovate: tag=v2.1.7
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B -Dchangelist=-${{github.run_number}} clean verify
- name: Extract version
run: |
VERSION=$(cat pom.xml | grep '<revision' | grep -o -E '[0-9]+\.[0-9]+(\.[0-9]+)?')
echo "${VERSION}-${{github.run_number}}" > target/version.txt
- name: Upload plugin
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # renovate: tag=v2.3.1
with:
name: jobcacher
path: |
target/jobcacher.hpi
target/version.txt
release:
needs: [build]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2.4.2
- name: Setup Git user
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Download plugin
uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869 # renovate: tag=v2.1.0
with:
name: jobcacher
path: .
- name: Create git tag
run: |
v=$(cat version.txt)
git tag v$v
git push origin v$v
echo "VERSION=${v}" >> $GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # renovate: tag=v1
with:
files: jobcacher.hpi
name: ${{ env.VERSION }}
tag_name: v${{ env.VERSION }}
body: Relase v${{ env.VERSION }}
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}