-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (41 loc) · 1.1 KB
/
generate-public-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
name: Create Public Draft Release
on:
workflow_dispatch:
inputs:
service:
description: "Release for service type"
required: true
type: string
tag:
description: "Release Tag"
required: true
type: string
name:
description: "Release Name"
required: true
type: string
body:
description: "Release Message"
required: true
type: string
permissions:
contents: write
jobs:
create_release:
runs-on: ubuntu-22.04
steps:
- name: Decode Base64
run: |
decoded_string=$(echo "${{ inputs.body }}" | base64 -d)
echo "Decoded string: $decoded_string"
cat > ${{ github.workspace }}/body.txt <<-EOF
$decoded_string
EOF
- name: Create Public Draft Release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}/body.txt
draft: true
name: "${{ inputs.name }}"
tag_name: "${{ inputs.tag }}"
token: ${{ secrets.GITHUB_TOKEN }}