Add wrapper script #4
Workflow file for this run
This file contains 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: 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: Download Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: klip-runner | |
- | |
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 Klip Runner | |
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 | |
- | |
name: Upload Klip Wrapper | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: bin/klip | |
asset_name: klip | |
asset_content_type: text/x-shellscript |