Skip to content

Release 5.2.45

Release 5.2.45 #64

Workflow file for this run

name: release
on:
push:
branches:
- 'master'
paths-ignore:
- '.gitlab-ci.yml'
- '*.md'
jobs:
maven-release:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.get-version.outputs.version }}
fitnesse-version: ${{ steps.get-version.outputs.fitnesse-version }}
selenium-version: ${{ steps.get-version.outputs.selenium-version }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Unsnapshot version
run: mvn versions:set -DremoveSnapshot
- id: get-version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "version=$VERSION" >> $GITHUB_OUTPUT
FITNESSE_VERSION=$(mvn help:evaluate -Dexpression=fitnesse.version -q -DforceStdout)
echo "fitnesse-version=$FITNESSE_VERSION" >> $GITHUB_OUTPUT
SELENIUM_VERSION=$(mvn help:evaluate -Dexpression=selenium.version -q -DforceStdout)
echo "selenium-version=$SELENIUM_VERSION" >> $GITHUB_OUTPUT
- name: upload release pom
uses: actions/upload-artifact@v3
with:
name: pom
path: pom.xml
if-no-files-found: error
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
maven_profiles: release
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.MAVEN_USERNAME }}
nexus_password: ${{ secrets.MAVEN_PASSWORD }}
- name: upload packages
uses: actions/upload-artifact@v3
with:
name: target
path: |
target/hsac-fitnesse-fixtures-*.jar
target/hsac-fitnesse-fixtures-*.zip
github-release:
needs: [maven-release]
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: download pom
uses: actions/download-artifact@v3
with:
name: pom
- name: download packages
uses: actions/download-artifact@v3
with:
name: target
path: target
- name: Replace changelog placeholders
uses: franzbischoff/replace_envs@v1
env:
VERSION: ${{ needs.maven-release.outputs.version }}
FITNESSE_VERSION: ${{ needs.maven-release.outputs.fitnesse-version }}
SELENIUM_VERSION: ${{ needs.maven-release.outputs.selenium-version }}
with:
from_file: './changelog.md'
to_file: './changelog.md'
commit: 'false'
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: Commit pom.xml without -SNAPSHOT
run: |
git add pom.xml
git commit -m "Prepare for release"
git push origin master
- name: Create Release
id: createRelease
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.maven-release.outputs.version }}
body_path: './changelog.md'
draft: false
prerelease: false
files: |
target/hsac-fitnesse-fixtures-*.jar
target/hsac-fitnesse-fixtures-*.zip
update-version:
needs: [github-release]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: Pull changes from github-release job
run: |
git pull origin
- name: Update version
run: |
mvn -B release:update-versions -DautoVersionSubmodules=true
- name: Push pom.xml with next -SNAPSHOT version to repository
run: |
git add pom.xml
git commit -m "Prepare for next developments" -m "[ci skip]"
git push origin master