-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.05 KB
/
tag-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Create Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release Tag
run: |
git config --global user.email "[email protected]"
git config --global user.name "divya4242"
# Get the latest commit hash
commit_hash=$(git rev-parse HEAD)
# Create a tag
git tag -a v${{ github.run_number }} -m "Release ${{ github.run_number }}"
# Push the tag to GitHub
git push origin --tags
- name: Create Release
uses: actions/create-release@v1
id: create_release
with:
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
body: |
Release ${{ github.run_number }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}