Add a button for creating releases manually (#136)

This commit is contained in:
folex 2021-05-28 19:38:21 +03:00 committed by GitHub
parent a12b5334cc
commit 9990eb0a66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 }}"