-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (74 loc) · 2.71 KB
/
resourcepack-dev.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
82
83
84
85
86
name: Resource Pack Dev Builds
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-resources-dev:
runs-on: ubuntu-latest
env:
TU1: 'Re-Console-Legacy-Resources-TU1-0.0.30-latest.zip'
TU3: 'Re-Console-Legacy-Resources-TU3-0.0.30-latest.zip'
TU5: 'Re-Console-Legacy-Resources-TU5-0.0.30-latest.zip'
VERSION: 0.0.30
steps:
- uses: actions/checkout@v4
- name: Create short commit SHA
id: vars
run: |
shortSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$shortSha" >> $GITHUB_ENV
- name: Create TU1 Resources
run: |
mkdir TU1-temp
cp -r ./Common/Assets/* ./TU1-temp/
cp -r ./TU1/TU1-Assets/* ./TU1-temp/
cp ./LICENSE ./TU1-temp/
cp ./README.md ./TU1-temp/
- name: Create TU3 Resources
run: |
mkdir TU3-temp
cp -r ./Common/Assets/* ./TU3-temp/
cp -r ./TU3/TU3-Assets/* ./TU3-temp/
cp ./LICENSE ./TU3-temp/
cp ./README.md ./TU3-temp/
- name: Create TU5 Resources
run: |
mkdir TU5-temp
cp -r ./Common/Assets/* ./TU5-temp/
cp -r ./TU5/TU5-Assets/* ./TU5-temp/
cp ./LICENSE ./TU5-temp/
cp ./README.md ./TU5-temp/
- name: Upload TU1 Resources to artifact
uses: actions/upload-artifact@v4
with:
name: "Re-Console-Legacy-Resources-TU1-dev-${{ env.COMMIT_SHORT_SHA }}"
path: TU1-temp
- name: Upload TU3 Resources to artifact
uses: actions/upload-artifact@v4
with:
name: "Re-Console-Legacy-Resources-TU3-dev-${{ env.COMMIT_SHORT_SHA }}"
path: TU3-temp
- name: Upload TU5 Resources to artifact
uses: actions/upload-artifact@v4
with:
name: "Re-Console-Legacy-Resources-TU5-dev-${{ env.COMMIT_SHORT_SHA }}"
path: TU5-temp
- name: Create release & upload
if: |
github.repository == 'ViolaFlower/RC-L-Resources' &&
github.event.action != 'pull_request' &&
github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tar czf $TU1 ./TU1-temp/
tar czf $TU3 ./TU3-temp/
tar czf $TU5 ./TU5-temp/
gh release create ${{ env.COMMIT_SHORT_SHA }} $TU1 $TU3 $TU5 -t "${VERSION}-${{ env.COMMIT_SHORT_SHA }}" -p
gh release delete $tag -y
git push --delete origin $tag
git tag -d $tag
gh release create "${VERSION}-latest" $TU1 $TU3 $TU5 -t "${VERSION}-latest"