-
-
Notifications
You must be signed in to change notification settings - Fork 48
65 lines (57 loc) · 1.6 KB
/
part_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
on:
workflow_call:
inputs:
releaseName:
required: true
type: string
stable:
required: false
type: boolean
default: false
name: "Release"
permissions:
contents: read
jobs:
create:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Create draft prerelease
if: ${{ !inputs.stable }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create \
--repo ${{ github.repository }} \
--title ${{ inputs.releaseName }} \
--prerelease \
--generate-notes \
${{ inputs.releaseName }}
- name: Create release
if: ${{ inputs.stable }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create \
--repo ${{ github.repository }} \
--title ${{ inputs.releaseName }} \
--generate-notes \
${{ inputs.releaseName }}
- name: "Download Docs Artifact"
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: docs
path: .
- name: Upload Docs
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload --clobber "${{ inputs.releaseName }}" \
--repo ${{ github.repository }} \
docs.tar.gz*