forked from atomsforhumanity/qcdata
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.06 KB
/
Copy pathcreate-release.yaml
File metadata and controls
40 lines (33 loc) · 1.06 KB
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
name: Create Release
on:
push:
tags:
- "*" # Match any tag
workflow_dispatch: # Enable manual triggering
jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
environment: release # Link to the protected environment
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Release Notes
id: extract_notes
run: |
VERSION=${{ github.ref_name }}
sed -n "/## \\[$VERSION\\]/,/## \\[/p" CHANGELOG.md | sed '$d' | sed "s/## \\[$VERSION\\]/## $VERSION/" > RELEASE_NOTES.md
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body_path: ./RELEASE_NOTES.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Output release URL
run: |
echo "Release URL: ${{ steps.create_release.outputs.html_url }}"