-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (32 loc) · 888 Bytes
/
release.yml
File metadata and controls
37 lines (32 loc) · 888 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
35
36
37
name: Release
on:
pull_request:
types:
- closed
branches:
- Main
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Git User
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Get latest tag
id: get_tag
run: echo "::set-output name=tag::$(git tag | grep -v '\-rc$' | sort -r | head -n 1)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_tag.outputs.tag }}
release_name: Release ${{ steps.get_tag.outputs.tag }}
draft: false