-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (39 loc) · 1.14 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
35
36
37
38
39
40
41
42
43
44
name: Release
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 6' # every Saturday
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Read version from Git ref
id: version
shell: pwsh
run: echo "version=$(if ($env:GITHUB_REF.StartsWith('refs/tags/v')) { $env:GITHUB_REF -replace '^refs/tags/v', '' } else { 'next' })" >> $env:GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Read the changelog
uses: ForNeVeR/ChangelogAutomation.action@v1
with:
input: ./CHANGELOG.md
output: ./changelog-section.md
- name: Upload the changelog
uses: actions/upload-artifact@v4
with:
name: changelog-section.md
path: ./changelog-section.md
- name: Create a release
if: startsWith(github.ref, 'refs/tags/v')
# noinspection SpellCheckingInspection
uses: softprops/action-gh-release@v1
with:
name: Emulsion v${{ steps.version.outputs.version }}
body_path: ./changelog-section.md