-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
62 lines (57 loc) · 1.79 KB
/
action.yml
File metadata and controls
62 lines (57 loc) · 1.79 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: OZI Draft
description: "OZI release draft action."
author: "Eden Ross Duff MSc <help@oziproject.dev>"
branding:
icon: 'edit'
color: 'gray-dark'
inputs:
github-token:
description: "GitHub workflow-generated token"
required: false
default: ${{ github.token }}
checkout-submodules:
description: "Whether to checkout submodules as well. true, false, or recursive"
default: true
outputs:
drafted:
description: "a release has been drafted"
value: ${{ steps.draft.outputs.created }}
tag:
description: "release tag name"
value: ${{ steps.version.outputs.tag }}
runs:
using: "composite"
steps:
- uses: actions/checkout@v6.0.2
with:
token: ${{ inputs.github-token }}
submodules: ${{ inputs.checkout-submodules }}
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@350c48fcb3ffcdfd2e0a235206bc2ecea6b69df0 # 10.5.3
with:
github_token: ${{ inputs.github-token }}
- name: Pass release draft status to job
id: draft
env:
CHECK: ${{ steps.release.outputs.released == 'true' }}
run: echo "created=$CHECK" >> $GITHUB_OUTPUT
shell: bash
- name: Set version
if: steps.release.outputs.released == 'true' || steps.draft.outputs.created == 'true'
id: version
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/upload-artifact@v7.0.0
if: steps.release.outputs.released == 'true' || steps.draft.outputs.created == 'true'
with:
include-hidden-files: true
name: 'security2'
path: |
./
!.git/config
- name: No release drafted
if: steps.release.outputs.released == 'false' || steps.draft.outputs.created == 'false'
run: exit 1
shell: bash