Skip to content

build: test historical release version #2 #227

build: test historical release version #2

build: test historical release version #2 #227

Workflow file for this run

# Main build pipeline, operates on `master` branch which is our integration branch and creates release
name: CI Master branch
on:
push:
branches:
- "master" # trap each push to master branch
- "release_*" # trap each push to branches starting with release_
paths: # but react only to changes in code or pipeline definition
- evita*/**/*.java
- evita*/**/pom.xml
- jacoco/**/pom.xml
- evita*/**/dist/**.*
- docker/**
- .github/**
concurrency:
group: ${{ github.ref_name }} # for the same branch
cancel-in-progress: true # run only one workflow at a time (cancel the previous)
jobs:
build:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
outputs:
release_id: ${{ steps.create_release.outputs.id }}
released_version: ${{ steps.release_version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # checkout sources
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Resolve new release version
id: release_version
uses: lukashornych/[email protected]
with:
prefix: 'v'
year_switch_mode: 'OnMinor'
minor-identifier: '/feat(?:\\([^)]+\\))?:/'
- name: Setup Java JDK
uses: actions/setup-java@v3 # setup JDK 17 for building
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build with Maven # run Maven without tests (tests must pass in dev branch)
run: |
export CURRENT_VERSION="${{ steps.release_version.outputs.version }}"
export NEW_VERSION="$( echo ${CURRENT_VERSION} | sed 's/^v//; s/-.*//')"
echo $NEW_VERSION > version.txt
echo "Version: $(cat version.txt)"
env:
EVITA_BUILD_VERSION: ${{ steps.release_version.outputs.version }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}