-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.24 KB
/
release.yml
File metadata and controls
43 lines (36 loc) · 1.24 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 Release
on:
workflow_dispatch:
inputs:
version:
description: "Release version"
required: true
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version input
id: vars
run: echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Append common_tools.sh to each script
run: |
# Store content of common_tools.sh removing the shebang line into a variable
common_tools_content=$(tail -n +2 scripts/common_tools.sh)
# Append common_tools.sh content to each script, excluding common_tools.sh itself
for script in scripts/*.sh; do
if [ "$script" != "scripts/common_tools.sh" ]; then
echo "$common_tools_content" >> $script
fi
done
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
commit: ${{ github.sha }}
draft: false
prerelease: false
generateReleaseNotes: true
artifacts: "scripts/*.sh"