mirror of
https://github.com/matifali/update-coder-template.git
synced 2024-09-20 06:46:04 +08:00
update release workflow
This commit is contained in:
parent
2d98654e5a
commit
a69293316d
13
.github/workflows/release.yaml
vendored
13
.github/workflows/release.yaml
vendored
|
@ -10,7 +10,18 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: update coder template
|
||||
# Get the version tag
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
# Create a pre release if tag name has alpha or beta
|
||||
- name: Create pre release
|
||||
if: contains(steps.get_version.outputs.VERSION, 'alpha') || contains(steps.get_version.outputs.VERSION, 'beta')
|
||||
run: gh release create ${{ github.ref }} -t ${{ github.ref_name }} --prerelease --generate-notes -R ${{ github.repository }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||
- name: craete release
|
||||
if: !contains(steps.get_version.outputs.VERSION , 'alpha') && !contains(steps.get_version.outputs.VERSION, 'beta')
|
||||
run: gh release create ${{ github.ref }} -t ${{ github.ref_name }} --generate-notes -R ${{ github.repository }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||
|
|
Loading…
Reference in a new issue