forked from Gerome-Elassaad/CodingIT
-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (29 loc) · 975 Bytes
/
release.yml
File metadata and controls
34 lines (29 loc) · 975 Bytes
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
name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: main
default_bump: "patch"
- name: Create a GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ steps.tag_version.outputs.new_tag }}
RELEASE_NAME: "Release v${{ steps.tag_version.outputs.new_version }}"
run: |
gh release create ${{ steps.tag_version.outputs.new_tag }} \
--title "Release v${{ steps.tag_version.outputs.new_version }}" \
--notes "${{ steps.tag_version.outputs.changelog }}"