Skip to content

Commit 16893a8

Browse files
committed
Add create-tag-release.yml
1 parent 96a5044 commit 16893a8

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release on Tag
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: write
14+
pull-requests: read
15+
16+
name: Generate Release
17+
steps:
18+
- name: checkout
19+
uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Get previous tag
24+
id: previousTag
25+
run: |
26+
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
27+
echo "previousTag: $name"
28+
echo "previousTag=$name" >> $GITHUB_ENV
29+
30+
- name: Generate changelog
31+
id: changelog
32+
uses: metcalfc/[email protected]
33+
with:
34+
myToken: ${{ secrets.GITHUB_TOKEN }}
35+
head-ref: ${{ env.previousTag }}
36+
base-ref: ${{ github.ref_name }}
37+
38+
- name: Create Release
39+
uses: ncipollo/[email protected]
40+
with:
41+
draft: true
42+
token: ${{ github.token }}
43+
name: "Release ${{ github.ref_name }}"
44+
body: "## Release Notes\n\nTODO\n\n## Commits\n\n${{ steps.changelog.outputs.changelog }}"

.github/workflows/rust-shader.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rust
1+
name: Build Shader
22

33
on:
44
push:

0 commit comments

Comments
 (0)