workflows
This commit is contained in:
parent
b052112f3e
commit
e0a8809201
2 changed files with 130 additions and 108 deletions
208
.github/workflows/build.yml
vendored
208
.github/workflows/build.yml
vendored
|
|
@ -68,117 +68,139 @@ jobs:
|
||||||
news=$(echo "$changelog_full" | sed -n '/### Изменения/,/###/p' | sed '$d')
|
news=$(echo "$changelog_full" | sed -n '/### Изменения/,/###/p' | sed '$d')
|
||||||
echo news=$news >> $GITHUB_OUTPUT
|
echo news=$news >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-cf-modpack:
|
- name: Create Discord message
|
||||||
name: Build CF Modpack
|
id: message
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [modpack-info]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
|
|
||||||
- name: Replace strings
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ needs.modpack-info.outputs.project_version }}
|
header="## **${{ steps.info.outputs.project_name }}** был обновлен до ${{ steps.info.outputs.project_version }}! :tada:"
|
||||||
sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/manifest.json
|
echo "header=$header" >> $GITHUB_OUTPUT
|
||||||
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
|
|
||||||
sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
|
|
||||||
|
|
||||||
- name: Export CF
|
link+="[CurseForge](<https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/5009295>) • "
|
||||||
run: |
|
link+="[GitHub](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/0.4.0>) • "
|
||||||
mkdir -p overrides
|
link+="[Issues](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/issues>)"
|
||||||
mv -vf {config,defaultconfigs,kubejs} overrides/
|
echo "link=$link" >> $GITHUB_OUTPUT
|
||||||
mv -vf .github/buildtools/modpack/manifest.json ./
|
|
||||||
mv -vf .github/buildtools/modpack/modlist.html ./
|
|
||||||
zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip manifest.json modlist.html overrides
|
|
||||||
|
|
||||||
- name: Upload zip cf
|
- name: Send Discord message
|
||||||
uses: actions/upload-artifact@v4.0.0
|
uses: hugoalh/send-discord-webhook-ghaction@v6.0.1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf
|
key: "${{secrets.RELEASES_1_20}}"
|
||||||
path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip
|
username: "TerraFirmaGreg"
|
||||||
retention-days: 5
|
avatar_url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png"
|
||||||
|
content: "${{ steps.message.outputs.header }}\n${{ steps.message.outputs.link }}\n${{ steps.info.outputs.news }}"
|
||||||
|
|
||||||
build-mmc-modpack:
|
# build-cf-modpack:
|
||||||
name: Build MMC Modpack
|
# name: Build CF Modpack
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
needs: [modpack-info]
|
# needs: [modpack-info]
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v4.1.1
|
# uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Replace strings
|
# - name: Replace strings
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
VERSION=${{ needs.modpack-info.outputs.project_version }}
|
# VERSION=${{ needs.modpack-info.outputs.project_version }}
|
||||||
sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/instance.cfg
|
# sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/manifest.json
|
||||||
sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
|
# sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
|
||||||
sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
|
# sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
|
||||||
|
|
||||||
- name: Download Mods
|
# - name: Export CF
|
||||||
run: |
|
# run: |
|
||||||
git submodule init
|
# mkdir -p overrides
|
||||||
cd mods
|
# mv -vf {config,defaultconfigs,kubejs} overrides/
|
||||||
git config --global credential.helper '!f() {
|
# mv -vf .github/buildtools/modpack/manifest.json ./
|
||||||
echo "username=Xikaro";
|
# mv -vf .github/buildtools/modpack/modlist.html ./
|
||||||
echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
|
# zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip manifest.json modlist.html overrides
|
||||||
git submodule update --recursive
|
|
||||||
|
|
||||||
- name: Export MMC
|
# - name: Upload zip cf
|
||||||
run: |
|
# uses: actions/upload-artifact@v4.0.0
|
||||||
mkdir -p .minecraft
|
# with:
|
||||||
mv -vf {config,defaultconfigs,kubejs,mods} .minecraft/
|
# name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf
|
||||||
mv -vf .github/buildtools/modpack/mmc-pack.json ./
|
# path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-cf.zip
|
||||||
mv -vf .github/buildtools/modpack/instance.cfg ./
|
# retention-days: 5
|
||||||
zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip mmc-pack.json instance.cfg .minecraft/
|
|
||||||
|
# build-mmc-modpack:
|
||||||
|
# name: Build MMC Modpack
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs: [modpack-info]
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
|
# - name: Replace strings
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# VERSION=${{ needs.modpack-info.outputs.project_version }}
|
||||||
|
# sed -i -e "s/DEV/${VERSION}/g" .github/buildtools/modpack/instance.cfg
|
||||||
|
# sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/main_menu.txt
|
||||||
|
# sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
|
||||||
|
|
||||||
|
# - name: Download Mods
|
||||||
|
# run: |
|
||||||
|
# git submodule init
|
||||||
|
# cd mods
|
||||||
|
# git config --global credential.helper '!f() {
|
||||||
|
# echo "username=Xikaro";
|
||||||
|
# echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
|
||||||
|
# git submodule update --recursive
|
||||||
|
|
||||||
|
# - name: Export MMC
|
||||||
|
# run: |
|
||||||
|
# mkdir -p .minecraft
|
||||||
|
# mv -vf {config,defaultconfigs,kubejs,mods} .minecraft/
|
||||||
|
# mv -vf .github/buildtools/modpack/mmc-pack.json ./
|
||||||
|
# mv -vf .github/buildtools/modpack/instance.cfg ./
|
||||||
|
# zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip mmc-pack.json instance.cfg .minecraft/
|
||||||
|
|
||||||
- name: Upload zip mmc
|
# - name: Upload zip mmc
|
||||||
uses: actions/upload-artifact@v4.0.0
|
# uses: actions/upload-artifact@v4.0.0
|
||||||
with:
|
# with:
|
||||||
name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc
|
# name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc
|
||||||
path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip
|
# path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-mmc.zip
|
||||||
retention-days: 5
|
# retention-days: 5
|
||||||
|
|
||||||
build-serverpack:
|
# build-serverpack:
|
||||||
name: Build Serverpack
|
# name: Build Serverpack
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
needs: [modpack-info]
|
# needs: [modpack-info]
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v4.1.1
|
# uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Replace strings
|
# - name: Replace strings
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
VERSION=${{ needs.modpack-info.outputs.project_version }}
|
# VERSION=${{ needs.modpack-info.outputs.project_version }}
|
||||||
sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
|
# sed -i -e "s/DEV/${VERSION}/g" config/bcc-common.toml
|
||||||
|
|
||||||
- name: Download Mods
|
# - name: Download Mods
|
||||||
run: |
|
# run: |
|
||||||
git submodule init
|
# git submodule init
|
||||||
cd mods
|
# cd mods
|
||||||
git config --global credential.helper '!f() {
|
# git config --global credential.helper '!f() {
|
||||||
echo "username=Xikaro";
|
# echo "username=Xikaro";
|
||||||
echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
|
# echo "password=${{ secrets.USER_TOKEN_XIKARO }}"; }; f'
|
||||||
git submodule update --recursive
|
# git submodule update --recursive
|
||||||
|
|
||||||
- name: Export serverpack
|
# - name: Export serverpack
|
||||||
run: |
|
# run: |
|
||||||
mkdir -p .minecraft
|
# mkdir -p .minecraft
|
||||||
mv -vf {config,defaultconfigs,kubejs,mods,.github/buildtools/serverpack/*} .minecraft
|
# mv -vf {config,defaultconfigs,kubejs,mods,.github/buildtools/serverpack/*} .minecraft
|
||||||
cat .github/buildtools/client_mod.txt | while read -r line; do find .minecraft/mods -name "$line" -delete; done
|
# cat .github/buildtools/client_mod.txt | while read -r line; do find .minecraft/mods -name "$line" -delete; done
|
||||||
zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip .minecraft/*
|
# zip -r ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip .minecraft/*
|
||||||
|
|
||||||
- name: Upload zip
|
# - name: Upload zip
|
||||||
uses: actions/upload-artifact@v4.0.0
|
# uses: actions/upload-artifact@v4.0.0
|
||||||
with:
|
# with:
|
||||||
name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server
|
# name: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server
|
||||||
path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip
|
# path: ${{ needs.modpack-info.outputs.project_name }}-${{ needs.modpack-info.outputs.project_version }}-server.zip
|
||||||
retention-days: 5
|
# retention-days: 5
|
||||||
|
|
||||||
|
#, build-cf-modpack, build-mmc-modpack, build-serverpack
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
needs: [modpack-info, build-cf-modpack, build-mmc-modpack, build-serverpack]
|
needs: [modpack-info]
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: ./.github/workflows/release.yml
|
uses: ./.github/workflows/release.yml
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
|
|
@ -50,20 +50,20 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server
|
name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server
|
||||||
|
|
||||||
# - name: Upload Curseforge
|
- name: Upload Curseforge
|
||||||
# id: cf_release
|
id: cf_release
|
||||||
# uses: SwitchAlpha/upload-curseforge-modpack-action@master
|
uses: SwitchAlpha/upload-curseforge-modpack-action@master
|
||||||
# with:
|
with:
|
||||||
# api-token: ${{ secrets.CF_API_TOKEN }}
|
api-token: ${{ secrets.CF_API_TOKEN }}
|
||||||
# project-id: ${{ env.CF_PROJECT_ID }}
|
project-id: ${{ env.CF_PROJECT_ID }}
|
||||||
# modpack-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-cf.zip
|
modpack-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-cf.zip
|
||||||
# modpack-server-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-server.zip
|
modpack-server-path: ${{ inputs.project_name }}-${{ inputs.project_version }}-server.zip
|
||||||
# changelog: ${{ inputs.changelog }}
|
changelog: ${{ inputs.changelog }}
|
||||||
# changelog-format: markdown
|
changelog-format: markdown
|
||||||
# game-version: ${{ inputs.mcversion }}
|
game-version: ${{ inputs.mcversion }}
|
||||||
# display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}
|
display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}
|
||||||
# server-display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server
|
server-display-name: ${{ inputs.project_name }}-${{ inputs.project_version }}-server
|
||||||
# release-type: ${{ env.RELEASE_TYPE }}
|
release-type: ${{ env.RELEASE_TYPE }}
|
||||||
|
|
||||||
- name: Create Discord message
|
- name: Create Discord message
|
||||||
id: message
|
id: message
|
||||||
|
|
@ -72,7 +72,7 @@ jobs:
|
||||||
header="## **${{ inputs.project_name }}** был обновлен до ${{ inputs.project_version }}! :tada:"
|
header="## **${{ inputs.project_name }}** был обновлен до ${{ inputs.project_version }}! :tada:"
|
||||||
echo "header=$header" >> $GITHUB_OUTPUT
|
echo "header=$header" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
link+="[CurseForge](<https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/5009295>) • "
|
link+="[CurseForge](<https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/${{ steps.cf_release.outputs.id }}>) • "
|
||||||
link+="[GitHub](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/${{ inputs.tag }}>) • "
|
link+="[GitHub](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/${{ inputs.tag }}>) • "
|
||||||
link+="[Issues](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/issues>)"
|
link+="[Issues](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/issues>)"
|
||||||
echo "link=$link" >> $GITHUB_OUTPUT
|
echo "link=$link" >> $GITHUB_OUTPUT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue