Skip to content

Update release.yml

Update release.yml #5

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # e.g., v1.2.3
workflow_dispatch:
inputs:
version:
description: 'Semantic Version (e.g., v1.2.3)'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Determine Version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false