diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5deefe05..a361a59b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,10 @@ on: workflow_dispatch: inputs: - draft: - description: "Whether to create draft or actual release. 'false' by default, put 'true' to make draft release" + release: + description: "Draft or public release?\nPut 'draft' to make a draft release" required: false - default: false + default: 'public' jobs: release: @@ -82,6 +82,15 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Determine if release should be drafted + run: | + set -x + if [ "${{ github.event.inputs.release }}" = "public" ]; then + echo "DRAFT=false" >> $GITHUB_ENV + else + echo "DRAFT=true" >> $GITHUB_ENV + fi + ### create release - uses: marvinpinto/action-automatic-releases@latest with: @@ -92,8 +101,6 @@ jobs: title: "Aqua Compiler ${{ env.VERSION }}" files: | ${{ env.JAR }} - body: | - [${{ env.VERSION }} @ NPM registry](https://www.npmjs.com/package/${{ env.PKG_NAME }}/v/${{ env.VERSION }}) - draft: true #${{ github.event.inputs.draft }} + draft: ${{ env.DRAFT }} prerelease: false - repo_token: "${{ secrets.GITHUB_TOKEN }}" + repo_token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file