-
Notifications
You must be signed in to change notification settings - Fork 14
81 lines (72 loc) · 2.9 KB
/
repack-and-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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Repack widescreen hacks
on:
workflow_dispatch:
push:
paths:
- '**.cht'
jobs:
check-binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Install dependencies
# run: |
# apk add git zip
- name: Get short SHA
id: slug
run: echo "::set-output name=chtcount::$(find CHT -name "*.cht" | wc -l)"
- name: append credits to all cheats
run: |
chmod +x ./Append.sh
./Append.sh "# Deploy Information: Hash:${{ steps.slug.outputs.sha8 }}, runner_id:${{ github.run_number }}"
- name: Make Changelog
run: |
git --no-pager log --name-only --oneline --pretty=format:"%n---------- commit %h by %an: [%s]%n -- Changed files are:">FULL_CHANGELOG.TXT
git --no-pager log --since="7 days ago" --date=human --pretty=format:"- %h %as %<(18)%an: %s">PARTIAL_CHANGELOG.TXT
echo FULL_CHANGELOG-----------------------
cat FULL_CHANGELOG.TXT
echo PARTIAL_CHANGELOG--------------------
cat PARTIAL_CHANGELOG.TXT
- name: zip cheats
run: |
zip widescreen_hacks CHT/*
- name: create release body
run: |
echo "- __cheats count:__ _${{ steps.slug.outputs.chtcount }}_">week_changes.log
echo "- [__List of supported games__](https://github.com/PS2-Widescreen/OPL-Widescreen-Cheats/blob/main/cheat_list.MD)">>week_changes.log
echo "![GitHub release (latest by date)](https://img.shields.io/github/downloads/PS2-Widescreen/OPL-Widescreen-Cheats/Latest/total?label=Downloads)">>week_changes.log
echo last week changes:>>week_changes.log
git --no-pager log --since="7 days ago" --date=human --pretty=format:"- %h %as %<(18)%an: %s">>week_changes.log
cat week_changes.log
# - name: Upload artifacts
# if: ${{ success() }}
# uses: actions/upload-artifact@v2
# with:
# name: WIDESCREEN
# path: |
# widescreen_hacks*.zip
- name: delete previous tag/release
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: Latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy release
uses: softprops/[email protected]
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fail_on_unmatched_files: true
name: "Latest Package"
tag_name: "Latest"
body_path: 'week_changes.log'
prerelease: false
files: |
widescreen_hacks*.zip
FULL_CHANGELOG.TXT
PARTIAL_CHANGELOG.TXT