-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (38 loc) · 1.58 KB
/
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
name: Minecraft Assets release
on:
repository_dispatch:
types: [data-release]
jobs:
update-mcassets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Update minecraft assets
run: cd minecraft-assets/ && git fetch --all --tags && git checkout ${{ github.event.client_payload.tag }}
- name: Update package.json
run: >
sed -i -E 's/^ "version": "[0-9]+\.[0-9]+\.[0-9]+"/ "version": "${{ github.event.client_payload.tag }}"/g' package.json
- name: Update doc/history.md
run: echo -e "## ${{ github.event.client_payload.tag }}\n* update mcassets\n\n$(cat doc/history.md)" > doc/history.md
- name: Create commits
run: |
git config user.name 'rom1504bot'
git config user.email '[email protected]'
git add minecraft-assets
git commit -m "Update Minecraft Assets"
git add package.json doc/history.md
git commit -m "Release ${{ github.event.client_payload.tag }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT_PASSWORD }}
committer: rom1504bot <[email protected]>
author: rom1504bot <[email protected]>
signoff: false
branch: release-${{ github.event.client_payload.tag }}
delete-branch: true
title: 'Release ${{ github.event.client_payload.tag }}'
body: |
A new version of minecraft-assets was released.