Skip to content

Release 7.4.0

Release 7.4.0 #112

Workflow file for this run

name: Create library jar
on:
push:
branches:
- main
env:
GH_TOKEN: ${{ github.token }}
jobs:
build_jar:
name: Build library jar
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Check out main branch
uses: actions/checkout@v4
- name: Install SSH Key
env:
found_ssh_key: ${{ secrets.GUIDE_SSH_KEY }}
if: ${{ env.found_ssh_key != '' }}
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.GUIDE_SSH_KEY }}
# noinspection SpellCheckingInspection
known_hosts: 'deepsymmetry.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMKq8T1IXQHNYLgO715YbxTXoVxEsJcha9h1lxyOXpa'
- name: Prepare Java
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'corretto'
- name: Determine release tag, library jar name, and snapshot status
# noinspection SpellCheckingInspection
run: |
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
RELEASE_TAG="v$PROJECT_VERSION"
HUMAN_VERSION=${PROJECT_VERSION/SNAPSHOT/Preview}
echo "release_tag=$RELEASE_TAG" >> $GITHUB_ENV
echo "release_name=$PROJECT_VERSION" >> $GITHUB_ENV
echo "built_name=beat-link-$PROJECT_VERSION.jar" >> $GITHUB_ENV
echo "artifact_name=beat-link-$HUMAN_VERSION.jar" >> $GITHUB_ENV
if [[ $RELEASE_TAG =~ .*-SNAPSHOT ]]
then
echo "release_snapshot=true" >> $GITHUB_ENV
else
echo "release_snapshot=false" >> $GITHUB_ENV
fi
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-
- name: Install dependencies and compile
run: mvn compile
- name: Build library jar
run: |
mvn package
mv target/$built_name ./$artifact_name
- name: Delete any pre-existing preview release
if: success()
run: bash .github/scripts/delete_preview.sh
- name: Create release and upload library jar
if: success()
run: bash .github/scripts/create_release.sh
- name: Publish the JavaDoc
if: success()
env:
GUIDE_SSH_KEY: ${{ secrets.GUIDE_SSH_KEY }}
run: bash .github/scripts/deploy_docs.sh
- name: Update release title, description, and status
if: success()
run: bash .github/scripts/finish_release.sh