Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: TriPaint ${{ github.event.inputs.version }}
draft: true
prerelease: false
release_assets:
name: Release assets
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux
- os: macos-latest
name: osx
- os: windows-latest
name: win
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- name: Setup
uses: coursier/setup-action@v1
with:
jvm: "[email protected]"
- name: Package files
run: sbt universal:packageBin
shell: bash
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: tripaint-${{ github.event.inputs.version }}-${{ matrix.name }}.zip
asset_path: target/universal/tripaint-${{ github.event.inputs.version }}.zip
asset_content_type: application/octet-stream
- name: Clean up cache
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
shell: bash