Skip to content

Commit

Permalink
ci: split release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nogic1008 committed Feb 25, 2021
1 parent 05a13bc commit a2edc0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,3 @@ jobs:
env:
STEPS_CONTEXT: ${{ toJson(steps.act.outputs) }}
run: echo $STEPS_CONTEXT
- name: Drafts next Release notes
if: (!contains(github.ref, 'tags/v'))
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
needs: [build]
if: contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
steps:
- name: Get Version
id: get_tag
run: echo ::set-output name=version::${TAG_REF_NAME##*/}
env:
TAG_REF_NAME: ${{ github.ref }}
- name: Release for GitHub Actions
uses: technote-space/release-github-actions@v7.0.1
with:
BRANCH_NAME: releases/${MAJOR}
CLEAN_TARGETS: .[!.]*,__tests__,coverage,lib,node_modules,src,*.js,*.ts,*.json,*.lock,_config.yml
COMMIT_MESSAGE: 'build: release ${{ steps.get_tag.outputs.version }} via ${{ github.sha }}'
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Release
runs-on: ubuntu-20.04
steps:
- name: Release for GitHub Actions
uses: technote-space/release-github-actions@v7.0.1
with:
BRANCH_NAME: releases/${MAJOR}
CLEAN_TARGETS: .[!.]*,__tests__,coverage,lib,node_modules,src,*.js,*.ts,*.json,*.lock,_config.yml
COMMIT_MESSAGE: 'build: release ${{ github.event.release.tag_name }} via ${{ github.sha }}'

0 comments on commit a2edc0e

Please sign in to comment.