Skip to content

Commit

Permalink
[devop] Add new github workflow to create a new github release
Browse files Browse the repository at this point in the history
  • Loading branch information
aadsm committed Mar 19, 2024
1 parent 2c5616f commit baf7412
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create GitHub Release

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish'
type: string
required: true
draft:
description: 'Draft'
type: boolean
default: true
required: true

jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: '${{inputs.tag}}'
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs.tag }}
NOTES_FILE: "${{runner.temp}}/notes.txt"
DRAFT: ${{ inputs.draft && '--draft' }}
run: |
echo "git show -s --format=%B | \
gh release create "$RELEASE_TAG" \
--repo="$GITHUB_REPOSITORY" \
--title="Version ${RELEASE_TAG#v}" \
--verify-tag \
"$DRAFT" \
-F -"

0 comments on commit baf7412

Please sign in to comment.