Skip to content

Commit

Permalink
chore: Update release workflow to include version number in the relea…
Browse files Browse the repository at this point in the history
…se name
  • Loading branch information
huangdijia committed Jun 4, 2024
1 parent d6a213c commit a166187
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
name: Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v1.0.0

name: Release
- "v*.*.*"

jobs:
release:
name: Release
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4

- name: Get the version
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
prerelease: false
generate_release_notes: true

0 comments on commit a166187

Please sign in to comment.