Skip to content

Commit 9883308

Browse files
author
Xikaro
committed
workflows final
1 parent 4611d42 commit 9883308

File tree

3 files changed

+137
-149
lines changed

3 files changed

+137
-149
lines changed

.github/workflows/build.yml

Lines changed: 122 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
project_version: ${{ steps.info.outputs.project_version }}
2222
mcversion: ${{ steps.info.outputs.mcversion }}
2323
tag: ${{ steps.version.outputs.tag }}
24-
news: ${{ steps.message.outputs.news }}
2524
changelog: ${{ steps.changelog.outputs.description }}
2625
steps:
2726
- name: Checkout
@@ -61,138 +60,128 @@ jobs:
6160
uses: coditory/changelog-parser@v1.0.2
6261
with:
6362
path: CHANGELOG.md
64-
65-
- name: Send Discord message
66-
uses: tsickert/discord-webhook@v5.4.0
63+
64+
65+
build-cf-modpack:
66+
name: Build CF Modpack
67+
runs-on: ubuntu-latest
68+
needs: [modpack-info]
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v4.1.1
72+
73+
- name: Replace strings
74+
shell: bash
75+
run: |
76+
VERSION=${{ needs.modpack-info.outputs.project_version }}
77+
sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/manifest.json
78+
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
79+
sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
80+
81+
- name: Export CF
82+
run: |
83+
mkdir -p overrides
84+
mv -vf {config,defaultconfigs,kubejs} overrides/
85+
mv -vf .github/buildtools/modpack/manifest.json ./
86+
mv -vf .github/buildtools/modpack/modlist.html ./
87+
zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip manifest.json modlist.html overrides
88+
89+
- name: Upload zip cf
90+
uses: actions/upload-artifact@v4.0.0
6791
with:
68-
webhook-url: ${{secrets.RELEASES_1_20}}
69-
username: "TerraFirmaGreg"
70-
avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png"
71-
embed-title: Release ${{ steps.changelog.outputs.version }}
72-
embed-url: https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/0.4.0
73-
embed-description: "${{ steps.changelog.outputs.description }}"
74-
embed-color: 5814783
75-
76-
# build-cf-modpack:
77-
# name: Build CF Modpack
78-
# runs-on: ubuntu-latest
79-
# needs: [modpack-info]
80-
# steps:
81-
# - name: Checkout
82-
# uses: actions/checkout@v4.1.1
83-
84-
# - name: Replace strings
85-
# shell: bash
86-
# run: |
87-
# VERSION=${{ needs.modpack-info.outputs.project_version }}
88-
# sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/manifest.json
89-
# sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
90-
# sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
91-
92-
# - name: Export CF
93-
# run: |
94-
# mkdir -p overrides
95-
# mv -vf {config,defaultconfigs,kubejs} overrides/
96-
# mv -vf .github/buildtools/modpack/manifest.json ./
97-
# mv -vf .github/buildtools/modpack/modlist.html ./
98-
# zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip manifest.json modlist.html overrides
99-
100-
# - name: Upload zip cf
101-
# uses: actions/upload-artifact@v4.0.0
102-
# with:
103-
# name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf
104-
# path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip
105-
# retention-days: 5
106-
107-
# build-mmc-modpack:
108-
# name: Build MMC Modpack
109-
# runs-on: ubuntu-latest
110-
# needs: [modpack-info]
111-
# steps:
112-
# - name: Checkout
113-
# uses: actions/checkout@v4.1.1
114-
115-
# - name: Replace strings
116-
# shell: bash
117-
# run: |
118-
# VERSION=${{ needs.modpack-info.outputs.project_version }}
119-
# sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/instance.cfg
120-
# sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
121-
# sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
122-
123-
# - name: Download Mods
124-
# run: |
125-
# git submodule init
126-
# cd mods
127-
# git config --global credential.helper '!f() {
128-
# echo "username=Xikaro";
129-
# echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
130-
# git submodule update --recursive
131-
132-
# - name: Export MMC
133-
# run: |
134-
# mkdir -p .minecraft
135-
# mv -vf {config,defaultconfigs,kubejs,mods} .minecraft/
136-
# mv -vf .github/buildtools/modpack/mmc-pack.json ./
137-
# mv -vf .github/buildtools/modpack/instance.cfg ./
138-
# zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip mmc-pack.json instance.cfg .minecraft/
92+
name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf
93+
path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip
94+
retention-days: 5
95+
96+
build-mmc-modpack:
97+
name: Build MMC Modpack
98+
runs-on: ubuntu-latest
99+
needs: [modpack-info]
100+
steps:
101+
- name: Checkout
102+
uses: actions/checkout@v4.1.1
103+
104+
- name: Replace strings
105+
shell: bash
106+
run: |
107+
VERSION=${{ needs.modpack-info.outputs.project_version }}
108+
sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/instance.cfg
109+
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
110+
sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
111+
112+
- name: Download Mods
113+
run: |
114+
git submodule init
115+
cd mods
116+
git config --global credential.helper '!f() {
117+
echo "username=Xikaro";
118+
echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
119+
git submodule update --recursive
120+
121+
- name: Export MMC
122+
run: |
123+
mkdir -p .minecraft
124+
mv -vf {config,defaultconfigs,kubejs,mods} .minecraft/
125+
mv -vf .github/buildtools/modpack/mmc-pack.json ./
126+
mv -vf .github/buildtools/modpack/instance.cfg ./
127+
zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip mmc-pack.json instance.cfg .minecraft/
139128
140-
# - name: Upload zip mmc
141-
# uses: actions/upload-artifact@v4.0.0
142-
# with:
143-
# name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc
144-
# path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip
145-
# retention-days: 5
146-
147-
# build-serverpack:
148-
# name: Build Serverpack
149-
# runs-on: ubuntu-latest
150-
# needs: [modpack-info]
151-
# steps:
152-
# - name: Checkout
153-
# uses: actions/checkout@v4.1.1
154-
155-
# - name: Replace strings
156-
# shell: bash
157-
# run: |
158-
# VERSION=${{ needs.modpack-info.outputs.project_version }}
159-
# sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
160-
161-
# - name: Download Mods
162-
# run: |
163-
# git submodule init
164-
# cd mods
165-
# git config --global credential.helper '!f() {
166-
# echo "username=Xikaro";
167-
# echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
168-
# git submodule update --recursive
169-
170-
# - name: Export serverpack
171-
# run: |
172-
# mkdir -p .minecraft
173-
# mv -vf {config,defaultconfigs,kubejs,mods,.github/buildtools/serverpack/*} .minecraft
174-
# cat .github/buildtools/client_mod.txt | while read -r line; do find .minecraft/mods -name "$line" -delete; done
175-
# zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip .minecraft/*
176-
177-
# - name: Upload zip
178-
# uses: actions/upload-artifact@v4.0.0
179-
# with:
180-
# name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server
181-
# path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip
182-
# retention-days: 5
183-
184-
185-
# release:
186-
# name: Release
187-
# needs: [modpack-info, build-cf-modpack, build-mmc-modpack, build-serverpack]
188-
# if: startsWith(github.ref, 'refs/tags/')
189-
# uses: ./.github/workflows/release.yml
190-
# with:
191-
# project_name: ${{ needs.modpack-info.outputs.project_name }}
192-
# project_version: ${{ needs.modpack-info.outputs.project_version }}
193-
# mcversion: ${{ needs.modpack-info.outputs.mcversion }}
194-
# tag: ${{ needs.modpack-info.outputs.tag }}
195-
# news: ${{ needs.modpack-info.outputs.news }}
196-
# changelog: ${{ needs.modpack-info.outputs.changelog }}
197-
# secrets: inherit
129+
- name: Upload zip mmc
130+
uses: actions/upload-artifact@v4.0.0
131+
with:
132+
name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc
133+
path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip
134+
retention-days: 5
135+
136+
build-serverpack:
137+
name: Build Serverpack
138+
runs-on: ubuntu-latest
139+
needs: [modpack-info]
140+
steps:
141+
- name: Checkout
142+
uses: actions/checkout@v4.1.1
143+
144+
- name: Replace strings
145+
shell: bash
146+
run: |
147+
VERSION=${{ needs.modpack-info.outputs.project_version }}
148+
sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
149+
150+
- name: Download Mods
151+
run: |
152+
git submodule init
153+
cd mods
154+
git config --global credential.helper '!f() {
155+
echo "username=Xikaro";
156+
echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
157+
git submodule update --recursive
158+
159+
- name: Export serverpack
160+
run: |
161+
mkdir -p .minecraft
162+
mv -vf {config,defaultconfigs,kubejs,mods,.github/buildtools/serverpack/*} .minecraft
163+
cat .github/buildtools/client_mod.txt | while read -r line; do find .minecraft/mods -name "$line" -delete; done
164+
zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip .minecraft/*
165+
166+
- name: Upload zip
167+
uses: actions/upload-artifact@v4.0.0
168+
with:
169+
name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server
170+
path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip
171+
retention-days: 5
172+
173+
174+
release:
175+
name: Release
176+
needs: [modpack-info, build-cf-modpack, build-mmc-modpack, build-serverpack]
177+
if: startsWith(github.ref, 'refs/tags/')
178+
uses: ./.github/workflows/release.yml
179+
with:
180+
project_name: ${{ needs.modpack-info.outputs.project_name }}
181+
project_version: ${{ needs.modpack-info.outputs.project_version }}
182+
mcversion: ${{ needs.modpack-info.outputs.mcversion }}
183+
tag: ${{ needs.modpack-info.outputs.tag }}
184+
news: ${{ needs.modpack-info.outputs.news }}
185+
changelog: ${{ needs.modpack-info.outputs.changelog }}
186+
secrets: inherit
198187

.github/workflows/release.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,16 @@ jobs:
6565
server-display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server
6666
release-type: ${{ env.RELEASE_TYPE }}
6767

68-
- name: Create Discord message
69-
id: message
70-
shell: bash
71-
run: |
72-
header="## **${{ inputs.project_name }}** был обновлен до ${{ inputs.project_version }}! :tada:"
73-
echo "header=$header" >> $GITHUB_OUTPUT
74-
75-
link+="[CurseForge](<https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/${{ steps.cf_release.outputs.id }}>) • "
76-
link+="[GitHub](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/${{ inputs.tag }}>) • "
77-
link+="[Issues](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/issues>)"
78-
echo "link=$link" >> $GITHUB_OUTPUT
79-
8068
- name: Send Discord message
81-
uses: hugoalh/send-discord-webhook-ghaction@v6.0.1
69+
uses: tsickert/discord-webhook@v5.4.0
8270
with:
83-
key: "${{secrets.RELEASES_1_20}}"
71+
webhook-url: ${{secrets.RELEASES_1_20}}
8472
username: "TerraFirmaGreg"
85-
avatar_url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png"
86-
content: "${{ steps.message.outputs.header }}\n${{ steps.message.outputs.link }}\n${{ inputs.news }}"
73+
avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png"
74+
embed-title: Release ${{ inputs.project_version }}
75+
embed-url: https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/${{ inputs.tag }}
76+
embed-description: ${{ inputs.changelog }}
77+
embed-color: 5814783
8778

8879
release-github:
8980
name: Deploy to GitHub

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [0.4.1] - 05.01.2024
4+
### Изменения
5+
- Исправлена кнопка подключения к официальному серверу.
6+
- Исправлен рецепт молда для лопаты.
7+
### Обновленные моды
8+
- TerraFirmaGreg-Core -> 0.2.5
9+
- notenoughanimations -> 1.7.0
10+
311
## [0.4.0] - 05.01.2024
412
### Изменения
513
- Удалены из игры бронзовые паровые машины, тк позволяли скипнуть очень много прогресии TFC.

0 commit comments

Comments
 (0)