Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 1719808

Browse files
committed
feat(ci): add release CI
1 parent 2c3443b commit 1719808

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
release:
9+
name: Release to GitHub
10+
if: contains(github.event.head_commit.message, 'release:') && github.repository == 'NTBBloodbath/doom-nvim'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
repository: ${{ github.repository }}
16+
path: "workspace"
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: Setup Release information
20+
run: |
21+
versionName=`sed '12q;d' ./workspace/lua/doom/utils/init.lua | cut -d "\"" -f2 | xargs`
22+
export VERSION_NAME=$versionName
23+
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
24+
25+
- name: Extract release notes
26+
id: extract-release-notes
27+
uses: ffurrer2/extract-release-notes@v1
28+
with:
29+
changelog_file: ./workspace/CHANGELOG.md
30+
31+
- name: Create Release
32+
uses: Xotl/cool-github-releases@v1
33+
with:
34+
mode: update
35+
isDraft: false
36+
isPrerelease: false
37+
tag_name: v${{ env.VERSION_NAME }}
38+
release_name: v${{ env.VERSION_NAME }}
39+
body_mrkdwn: ${{ steps.extract-release-notes.outputs.release_notes }}
40+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)