Skip to content

Commit

Permalink
ci(create-release): auto setup github release after version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 authored May 17, 2020
1 parent e14208e commit 9875f81
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create release

on:
push:
tags:
- 'v*'

jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get semver number
id: get_semver
env:
TAG_NAME: ${{ github.ref }}
run: echo "::set-output name=num::${TAG_NAME:11}"

- name: Create release on GitHub API
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: "v${{ steps.get_semver.outputs.num }}"
body: |
Version ${{ steps.get_semver.outputs.num }}
draft: false
prerelease: false

0 comments on commit 9875f81

Please sign in to comment.