Repository navigation
58 lines (48 loc) · 1.5 KB
/
Copy pathRelease.yml
File metadata and controls
58 lines (48 loc) · 1.5 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
name: Release
on:
workflow_call:
outputs:
artifacts:
description: "Newline-delimited list of artifact filenames downloaded"
value: ${{ jobs.Release.outputs.artifacts }}
jobs:
Release:
name: Draft Release Page
runs-on: ubuntu-latest
outputs:
artifacts: ${{ steps.get_variables.outputs.artifacts }}
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v8
with:
merge-multiple: True
- name: Extract Git tag and Artifact names
id: get_variables
run: |
GIT_TAG=${GITHUB_REF#refs/*/}
RELEASE_VERSION=${GIT_TAG#v}
RELEASE_DATETIME="$(date --utc '+%Y-%m-%d %H:%M:%S')"
# write to step outputs
cat >> "$GITHUB_OUTPUT" << EOF
gitTag=${GIT_TAG}
version=${RELEASE_VERSION}
datetime=${RELEASE_DATETIME}
EOF
# Multi-line variables
echo "artifacts<<EOF" >> $GITHUB_OUTPUT
ls | xargs -n 1 >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release Page
uses: softprops/action-gh-release@v3
with:
files: ${{ steps.get_variables.outputs.artifacts }}
body: |
**Automated Release created on: ${{ steps.get_variables.outputs.datetime }}**
## New Features
* tbd
## Changes
* tbd
## Bug Fixes
* tbd
draft: true
prerelease: false