Release 2.6.0 #50
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release Loki | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build with Java 8 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup JDK 8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| - name: Install Ant | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ant | |
| - name: Cache Ivy dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.ivy2/cache | |
| key: ivy-${{ runner.os }}-${{ hashFiles('**/ivy.xml') }} | |
| restore-keys: | | |
| ivy-${{ runner.os }}- | |
| - name: Fetch Ivy | |
| run: ant ivy | |
| - name: Build | |
| run: ant clean build | |
| - name: Extract version from tag | |
| run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: Generate release notes | |
| run: | | |
| GH_REPO="${{ github.repository }}" | |
| TAG=${GITHUB_REF#refs/tags/} | |
| PREV_TAG=$(git tag --sort=-creatordate | awk -v cur="$TAG" '$0!=cur {print; exit}') | |
| RANGE="${PREV_TAG:+$PREV_TAG..}$TAG" | |
| { | |
| git log --reverse --format='%H%x09%h%x09%s' "$RANGE" | while IFS=$'\t' read -r FULL SHORT SUBJ; do | |
| printf -- '- %s ([%s](https://github.com/%s/commit/%s))\n' "$SUBJ" "$SHORT" "$GH_REPO" "$FULL" | |
| BODY=$(git log -1 --format='%b' "$FULL") | |
| [ -n "$BODY" ] && printf '%s\n' "$BODY" | sed 's/^/ /' | |
| printf '\n' | |
| done | |
| } > RELEASE_NOTES.md | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body_path: RELEASE_NOTES.md | |
| draft: false | |
| prerelease: false | |
| files: build/dist/Loki-${{ env.RELEASE_TAG }}.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |