-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
43 lines (42 loc) · 1.87 KB
/
action.yml
File metadata and controls
43 lines (42 loc) · 1.87 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
41
42
43
name: 'Create GitHub release'
author: 'Pete Sramek'
description: 'Create GitHub release.'
inputs:
release-version:
description: 'Version to use for the release.'
required: true
is-preview:
description: 'Is this a preview release?'
required: true
notes-start-tag:
description: 'Tag to start generating release notes from. Default: '''''
required: false
default: ''
runs:
using: composite
steps:
- name: 'Checkout ${{ github.head_ref || github.ref }}'
uses: actions/checkout@v6
- run: |
echo "release-version=${{ inputs.release-version }}"
echo "is-preview=${{ inputs.is-preview }}"
echo "preview-argument=${{ inputs.is-preview == 'true' && '--prerelease' || '' }}"
echo "notes-start-tag=${{ inputs.notes-start-tag }}"
echo "notes-start-tag-argument=${{ inputs.notes-start-tag != '' && format('--notes-start-tag {0}', inputs.notes-start-tag) || '' }}"
shell: bash
- name: 'Configure git identity'
uses: './.github/actions/git/configure-identity'
- name: 'Create git tag ${{ inputs.release-version }}'
shell: bash
run: |
git tag -a ${{ inputs.release-version }} -m "${{ inputs.release-version }}"
git push origin ${{ inputs.release-version }}
- name: 'Create GitHub release PolylineAlgorithm ${{ inputs.release-version }}'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
release-version: ${{ inputs.release-version }}
preview-argument: "${{ inputs.is-preview == 'true' && '--prerelease' || '' }}"
notes-start-tag-argument: "${{ inputs.notes-start-tag != '' && format('--notes-start-tag {0}', inputs.notes-start-tag) || '' }}"
run: |
gh release create ${{ env.release-version }} --generate-notes --discussion-category "General" ${{ env.preview-argument }} ${{ env.notes-start-tag-argument }}