Skip to content

chore: tidy up readme for now (#49) #96

chore: tidy up readme for now (#49)

chore: tidy up readme for now (#49) #96

Workflow file for this run

name: CI
# We run CI on PRs targetting main, and pushes to the main branch. We also run
# on release created events, using the tag name as the version.
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
jobs:
ci:
name: Package, Test, and Release
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
cache: maven
- name: Set POM version
# Set the version in the POM to the short commit hash and append
# -SNAPSHOT to the version. This allows us to test the release process
# on branches without having to push a tag. If we are triggered by a
# release event, we set the version to the release version as the tag.
run: |
if [[ $GITHUB_EVENT_NAME == release ]]; then
mvn versions:set -DnewVersion=${GITHUB_REF#refs/tags/} --file posthog/pom.xml
else
mvn versions:set -DnewVersion=$(git rev-parse --short HEAD)-SNAPSHOT --file posthog/pom.xml
fi
- name: Build with Maven
run: mvn package --file posthog/pom.xml -DskipTests --batch-mode --show-version
- name: Run tests
run: mvn test --file posthog/pom.xml --batch-mode --show-version