Fixed release assets to not auto-release (#38)
This commit is contained in:
parent
d1c825d79b
commit
1a2f7042d4
2 changed files with 30 additions and 9 deletions
|
|
@ -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
22
.github/workflows/draft-release.yml
vendored
Normal 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 }}
|
||||
Reference in a new issue