-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (61 loc) · 2.38 KB
/
version.yml
File metadata and controls
68 lines (61 loc) · 2.38 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
59
60
61
62
63
64
65
66
67
68
name: Version
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- name: Regex replace
id: regex
uses: jacobtomlinson/gha-find-replace@v2
with:
find: .*begin\n.*Login.PlayerIndex.*:=.*((.+\n)+).*StatsPayload.Username.*:=.*'.*'.*((.+\n)+).*end;\n
replace: |
begin
Login.PlayerIndex := 0;
StatsPayload.Username := '';
end;
include: "**.simba"
regex: true
- name: Commit files
if: ${{ steps.regex.outputs.modifiedFiles > 0 }}
run: |
git config --local user.email "41898282+wasp-regex-replacer[bot]@users.noreply.github.com"
git config --local user.name "wasp-regex-replacer[bot]"
git commit -m "Regex replaced script settings" -a
- name: Push changes
if: ${{ steps.regex.outputs.modifiedFiles > 0 }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Generate changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3.18.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
git-message: "chore(release): {version}"
preset: "angular"
tag-prefix: "v"
output-file: "CHANGELOG.md"
skip-version-file: "true"
skip-on-empty: "true"
skip-commit: "false"
- name: Create release
uses: actions/create-release@v1.1.4
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
- name: Discord notification
uses: rguillaume/discord-action-embed@v1.0.4
with:
webhook: ${{ secrets.UPDATES_WEBHOOK }}
embed: '{"title": "Update: ${{ github.event.repository.name }}", "description": ${{ toJSON(github.event.head_commit.message) }}, "footer": {"text": "Committer: ${{ github.event.head_commit.author.username }} Warning: wasp-mini is unmaintained"}, "color": "16744192"}'