Skip to content

Build #276

Build #276 #276

Workflow file for this run

name: Build
run-name: "Build #${{ github.run_number }}"
on:
push:
tags:
- 'v*'
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
get-changelog:
name: Get Changelog
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Changelog
shell: bash
run: |
latest_tag=$(git describe --tags --abbrev=0)
{ grep --color=auto -Pzo "(?<=## $latest_tag)((?!\n## )[\s\S])*" ./CHANGELOG.md || true; } | sed '$ s/.$//' > ./NEW_CHANGELOG.md
- name: Upload Changelog
uses: actions/upload-artifact@v4
with:
name: changelog
path: ${{ github.workspace }}/NEW_CHANGELOG.md
build-jvm-jar:
name: Build JVM Jar
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: 📦 Build JVM Jar
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
arguments: jvmJar
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
gradle-distribution-sha-256-sum-warning: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JVM Jar
uses: actions/upload-artifact@v4
with:
name: jvm-jar
path: build/libs/pakku.jar
build-jvm-dist-zip:
name: Build JVM ZIP Distribution
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: 📦 Build JVM distZip
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
arguments: distZip
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
gradle-distribution-sha-256-sum-warning: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JVM ZIP Distribution
uses: actions/upload-artifact@v4
with:
name: jvm-dist-zip
path: build/distributions/*.zip
build-jvm-dist-tar:
name: Build JVM Tar Distribution
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: 📦 Build JVM distTar
uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
arguments: distTar
properties: |
org.gradle.vfs.watch=false
org.gradle.vfs.verbose=false
gradle-distribution-sha-256-sum-warning: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JVM Tar Distribution
uses: actions/upload-artifact@v4
with:
name: jvm-dist-tar
path: build/distributions/
release:
name: Release
runs-on: ubuntu-latest
needs: [get-changelog, build-jvm-jar, build-jvm-dist-zip, build-jvm-dist-tar]
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifact Changelog
uses: actions/download-artifact@v4
with:
name: changelog
- name: Download Artifact JVM Jar
uses: actions/download-artifact@v4
with:
name: jvm-jar
path: jar
- name: Download Artifact JVM ZIP Distribution
uses: actions/download-artifact@v4
with:
name: jvm-dist-zip
path: dist
- name: Download Artifact JVM Tar Distribution
uses: actions/download-artifact@v4
with:
name: jvm-dist-tar
path: dist
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: ./NEW_CHANGELOG.md
prerelease: false
token: ${{ secrets.PUSH_ACCESS_TOKEN }}
files: |
jar/pakku.jar
dist/*.zip
dist/*.tar
close-fixed-issues:
name: Close Fixed Issues
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: close-fixed-in-dev
uses: juraj-hrivnak/close-issues-based-on-label@master
env:
LABEL: "fixed in dev"
VERSION: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"