-
Notifications
You must be signed in to change notification settings - Fork 32
34 lines (33 loc) · 1.06 KB
/
release.yml
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: create-release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v4.3.1
jobs:
release:
runs-on: ubuntu-latest
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v4
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: Release ${{ github.ref }}
body: ${{ steps.changelog.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Major Version Tag
run: |
MAJOR_VERSION=v$(echo "${{ github.ref }}" | grep -oE '^v[0-9]+')
git tag -f $MAJOR_VERSION
git push origin $MAJOR_VERSION --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}