-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (39 loc) · 1.19 KB
/
push.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
name: Push Release
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout latest repository commit
uses: actions/checkout@v4.1.1
with:
show-progress: false
- id: get-tag
name: Fetches latest release tag
shell: sh
run: |
LATEST_TAG="$(grep -m 1 -o '## \[.*\]' Changelog.md | awk -F'[][]' '{print $2}')"
echo "TAG=$LATEST_TAG" >> "$GITHUB_ENV"
- name: Zip folder
run: |
sudo apt-get install -y zip
zip -r EFI.zip EFI
env:
TAG: ${{ env.TAG }}
- id: generate-notes
name: Generate Release Notes
shell: sh
run: |
BODY="$(sed -n "/## \[$TAG\]/,/## \[/p" Changelog.md | sed -e '1,2d;$d')"
echo "$BODY" > ${{ github.workspace }}-RELEASE_NOTES.txt
env:
TAG: ${{ env.TAG }}
- name: Create release
uses: softprops/action-gh-release@v0.1.15
with:
name: v${{ env.TAG }}
tag_name: ${{ env.TAG }}
body_path: ${{ github.workspace }}-RELEASE_NOTES.txt
files: EFI.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}