Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneeVandervelde committed Nov 18, 2024
1 parent 3e373ed commit 8334606
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release
on:
push:
tags: ['*']
jobs:
build:
name: Build Runner
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Configure Java
uses: actions/[email protected]
with:
java-version: 22
distribution: temurin
-
name: Build Runner
run: bin/gradlew klip-runner:installDist
-
name: Create TAR Archive
run: |
mkdir -p build/artifacts
tar -czf build/artifacts/klip-runner.tar.gz -C klip-runner/build/install klip
-
name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: klip-runner
path: build/artifacts/klip-runner.tar.gz
draft-release:
needs: build
name: Draft Github Release
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Prepare Changelog Text
run: mkdir -p build && sed '1,/---/d' CHANGELOG.md | awk '/---/{exit}1' | sed '$d' > build/RELEASE.md
-
name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref_name }}
draft: true
prerelease: false
body_path: build/RELEASE.md
-
name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: klip-runner.tar.gz
asset_name: klip-runner.tar.gz
asset_content_type: application/gzip

0 comments on commit 8334606

Please sign in to comment.