Skip to content

Commit

Permalink
feat(flow): add release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Vacxe committed Mar 19, 2024
1 parent d91b07c commit bc11699
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Release distribution

on:
workflow_dispatch:
release:
types: [created]

jobs:
dangerKotlinLibrary-shadowJar:
Expand All @@ -22,7 +23,7 @@ jobs:
name: lib
path: danger-kotlin-library/build/libs/danger-kotlin.jar

dangerKotlin-build:
dangerKotlin-build-and-distribute:
needs: [ dangerKotlinLibrary-shadowJar ]
strategy:
fail-fast: false
Expand Down Expand Up @@ -50,12 +51,22 @@ jobs:
mkdir -p dist
mkdir -p dist/lib/danger
mkdir -p dist/bin
ls -R
mv "danger-kotlin.jar" "dist/lib/danger"
mv "danger-kotlin/build/bin/runner/releaseExecutable/danger-kotlin.kexe" "dist/bin/danger-kotlin"
chmod +x dist/bin/danger-kotlin
- name: Zip target release
uses: actions/upload-artifact@v4
- name: Tar files
run: tar -cvf danger-kotlin-${{ matrix.target.compiler }}.tar dist
- name: Get release information
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload artifacts to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: danger-kotlin-${{ matrix.compiler.compiler }}
path: dist/*
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./danger-kotlin-${{ matrix.target.compiler }}.tar
asset_name: danger-kotlin-${{ matrix.target.compiler }}.tar
asset_content_type: application/x-tar

0 comments on commit bc11699

Please sign in to comment.