-
Notifications
You must be signed in to change notification settings - Fork 23
43 lines (38 loc) · 1.21 KB
/
reusable-publish.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
name: -Reusable Publish Release
on:
workflow_call:
inputs:
version:
required: true
type: string
description: Version to publish
jobs:
publish:
name: Publish ${{ inputs.version }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Is Pre Release ?
id: pre_release
if: github.event_name != 'workflow_dispatch'
uses: heineiuo/[email protected]
- name: Build Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: .changelog-generator.json
ignorePreReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create-release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ inputs.version }}
release_name: Release ${{ inputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: ${{ github.event_name != 'workflow_dispatch' && steps.pre_release.outputs.release_type == 'prerelease' }}