Update new_release.yml

This commit is contained in:
Ishaan Jaff 2024-01-04 13:43:41 +05:30 committed by GitHub
parent 7aa597afd1
commit 0aca4dd0b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,15 +1,36 @@
name: Release project
name: New Release
on:
workflow_dispatch:
inputs:
tag:
description: "The tag version you want to release"
jobs:
release:
name: Release
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Release
uses: huggingface/semver-release-action@latest
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install gh CLI
run: npm install -g gh
- name: Set up Git
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- name: Login to GitHub with token
run: gh auth login --with-token <<<"${{ secrets.GH_TOKEN }}"
- name: Create GitHub Release
if: success()
run: |
# Create a release with the specified tag
gh release create ${{ github.event.inputs.tag }} -t "${{ github.event.inputs.tag }}" -n "Release ${{ github.event.inputs.tag }}"