cloudant-labs / clouseau

Expose Lucene features as an erlang-like node
Apache License 2.0
57 stars 32 forks source link

Add release workflow #57

Closed iilyak closed 2 years ago

iilyak commented 2 years ago

This PR adds a github workflow to create a release which includes a clouseau-${TAG }-dist.zip artifact.

The release notes generation is not yet working due to https://github.com/cli/cli/issues/6159

The approach was tested on a personal fork. Here is a log of a successful build

The workflow is modeled after maven.yml workflow. The actual changes are:

< name: Java CI with Maven and Erlang
---
> name: Release
8,10c5,6
<     branches: [ master ]
<   pull_request:
<     branches: [ master ]
---
>     tags:
>       - '*'
13,14c9,10
<   build:
<
---
>   release:
>     name: Release of clouseau-{version}-dist.zip
16d11
<
18a14,17
>       - name: Set ENV for github-release
>         run: |
>           echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
>           echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
30a30,36
>       - name: Copy the release artifacts
>         run: mv target/clouseau-${{ env.RELEASE_TAG }}.zip target/clouseau-${{ env.RELEASE_TAG }}-dist.zip
>       - name: Create release
>         run: |
>           gh release create '${{ env.RELEASE_TAG }}' --title 'Release ${{ env.RELEASE_TAG }}' --generate-notes target/clouseau-${{ env.RELEASE_TAG }}-dist.zip
>         env:
>           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}