generated from a3510377/discord-py-cord-template
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (46 loc) · 1.24 KB
/
build.yaml
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
name: releaser
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- README.md
- .github/**
- .vscode/**
- "!.github/workflows/**"
# schedule:
# - cron: 33 17 * * *
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout for Github repository workspace
uses: actions/checkout@v4
- name: Clone
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: __old_version
ref: releaser
- name: releaser
run: |
git config --global user.name "$user_name"
git config --global user.email "$user_email"
rsync -a extra/ __old_version/
cd __old_version
git add -A
if [[ `git status --porcelain` ]]; then
git commit -m "${{ github.event.head_commit.message }}"
git push -f https://_:"$token"@$repository "$ref_name":"$ref_name"
fi
shell: bash
env:
repository: github.com/${{ github.repository }}
ref_name: releaser
token: ${{ secrets.GITHUB_TOKEN }}
user_name: GitHub Action
user_email: [email protected]