Skip to content

Commit

Permalink
Fixed the release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Martomate committed Aug 26, 2024
1 parent cec5caf commit 308a36f
Showing 1 changed file with 9 additions and 43 deletions.
52 changes: 9 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,10 @@ 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
release:
name: Build release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -42,29 +20,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/cache-action@v6
- name: Setup
uses: coursier/setup-action@v1
with:
jvm: "[email protected]"
jvm: "adopt:17"
apps: sbt
- 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 }}
- name: Upload package
uses: actions/upload-artifact@v4
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
name: tripaint-${{matrix.name}}
path: app/target/universal/

0 comments on commit 308a36f

Please sign in to comment.