make CI create tags

This commit is contained in:
Kevin Hester 2021-04-16 15:03:38 +08:00
parent b0013e77d1
commit dc7f715acd
2 changed files with 23 additions and 8 deletions

View File

@ -8,14 +8,14 @@ on:
jobs: jobs:
setup: setup:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Startup # - name: Startup
run: echo "No action setup currently needed, skipping..." # run: echo "No action setup currently needed, skipping..."
build: build:
needs: setup # needs: setup
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -1,8 +1,15 @@
name: Make Release name: Make Release
on: on:
# Can optionally take parameters from the github UI, more info here https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/#:~:text=You%20can%20now%20create%20workflows,the%20workflow%20is%20run%20on. # Can optionally take parameters from the github UI, more info here https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/#:~:text=You%20can%20now%20create%20workflows,the%20workflow%20is%20run%20on.
workflow_dispatch: # workflow_dispatch:
inputs: # inputs:
# Only want to be run if a new tag starting with v is pushed.
push:
branches:
- "!*"
tags:
- "v*"
jobs: jobs:
build: build:
@ -14,6 +21,14 @@ jobs:
with: with:
submodules: 'recursive' submodules: 'recursive'
# get github branch and tag names as ${{ steps.branch_name.outputs.SOURCE_TAG }}
- name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
@ -47,7 +62,7 @@ jobs:
draft: true draft: true
prerelease: true prerelease: true
release_name: ${{ steps.version.outputs.version }} alpha release_name: ${{ steps.version.outputs.version }} alpha
tag_name: ${{ steps.version.outputs.version }} tag_name: ${{ steps.branch_name.outputs.SOURCE_TAG }}
# was ${{ github.ref }} # was ${{ github.ref }}
body: | body: |
Autogenerated by github action, developer should edit as required before publishing... Autogenerated by github action, developer should edit as required before publishing...