Fixed release assets to not auto-release (#38)

This commit is contained in:
Ceferino Patino 2022-04-02 21:01:07 -05:00 committed by GitHub
commit 1a2f7042d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 9 deletions

View file

@ -3,13 +3,15 @@
name: Build release assets
name: Publish
on:
push:
branches: [development]
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
draft:
environment: production
runs-on: ubuntu-latest
@ -27,17 +29,14 @@ jobs:
node-version: 16.x
- name: Install dependencies and build
run: npm run dist
- uses: release-drafter/release-drafter@v5
id: release-draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release-draft.outputs.tag_name }}
tag: ${{ github.ref }}
file: ./dist.tar.gz
asset_name: $tag-dist.tar.gz
asset_content_type: application/gzip
overwrite: true

22
.github/workflows/draft-release.yml vendored Normal file
View file

@ -0,0 +1,22 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Create release draft
on:
push:
branches: [development]
workflow_dispatch:
jobs:
draft:
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Draft release
uses: release-drafter/release-drafter@v5
id: release-draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}