Skip to content

Commit

Permalink
ci: publish cli in release
Browse files Browse the repository at this point in the history
  • Loading branch information
Peva Blanchard committed Oct 16, 2024
1 parent dcf7172 commit 2c79994
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Publish

on:
push:
tags: [ "lca-*" ]
tags: [ "lca-*.*.*" ]
workflow_dispatch:

jobs:
publish:
Expand All @@ -25,8 +26,33 @@ jobs:
java-version: 17
cache: gradle

- name: Publish
- name: Publish gradle packages
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew :core:publish :grammar:publish

- name: Package CLI
run: |
./gradlew :cli:installDist
tar -czvf lcaac-cli-${{ github.ref_name }}.tar.gz -C cli/build/install lcaac
- name: Create a GitHub release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload the release asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./lcaac-cli-${{ github.ref_name }}.tar.gz
asset_name: lcaac-cli-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip

0 comments on commit 2c79994

Please sign in to comment.