Skip to content

Commit

Permalink
chore: Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed May 31, 2024
1 parent 2862ca9 commit be6b840
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 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
- name: Checkout
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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 be6b840

Please sign in to comment.