Skip to content

Release

Release #16

Workflow file for this run

name: Release
on:
workflow_dispatch:
permissions:
contents: write
pages: write
jobs:
publish-library:
name: Publish artifacts
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Publish artifacts to maven central
run: ./gradlew publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASS }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASS }}
publish-documentation:
name: Publish documentation
needs: [publish-library]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Run dokka
run: |
./gradlew dokkaHtmlMultiModule
# Move dokka documentation to docs/api directory
mv ./build/dokka/htmlMultiModule ./docs/api
- name: Install python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Configure git credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Build and upload docs
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install -r mkdocs-requirements.txt
mkdocs build
mkdocs gh-deploy --force
publish-release:
name: Create github release
needs: [publish-library, publish-documentation]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read version
run: |
version=$(cat trckr.version | tr -d '\n')
echo "version=$version" >> $GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}/changelog.md
name: v${{ env.version }}
tag_name: v${{ env.version }}
token: ${{ secrets.GITHUB_TOKEN }}