Skip to content

Release #21

Release #21 #21

Workflow file for this run

name: Release
run-name: "Release #${{ github.run_number }}"
on:
push:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
RELEASE_TYPE: "RELEASE"
jobs:
modpack-info:
name: Modpack Info
runs-on: ubuntu-latest
outputs:
project_name: ${{ steps.info.outputs.project_name }}
project_version: ${{ steps.info.outputs.project_version }}
mc_version: ${{ steps.info.outputs.mc_version }}
changelog_ru: ${{ steps.changelog_ru.outputs.description }}
changelog_en: ${{ steps.changelog_en.outputs.description }}
changelog_mods: ${{ steps.changelog_mods.outputs.description }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Get tag
id: version
uses: "WyriHaximus/github-action-get-previous-tag@v1.3.0"
with:
fallback: tag_not_found
- name: Modpack info
id: info
shell: bash
run: |
set +e
if [ ! -f ./.github/buildtools/modpack/manifest.json ]; then
echo "::error::Could not find manifest.json" && exit 1
fi
manifestjson=`cat ./.github/buildtools/modpack/manifest.json`
project_name=`echo $(jq -r '.name' <<< "$manifestjson")`
echo "project_name=$project_name" >> $GITHUB_OUTPUT
mc_version=`echo $(jq -r '.minecraft.version' <<< "$manifestjson")`
echo "mc_version=$mc_version" >> $GITHUB_OUTPUT
if [[ ${{ startsWith(github.ref, 'refs/tags/') }} == true ]]; then
echo "project_version=${{ steps.version.outputs.tag }}" >> $GITHUB_OUTPUT
else
echo "project_version=build.${{ github.run_number }}" >> $GITHUB_OUTPUT
fi
- name: Changelog Parser
id: changelog_ru
uses: coditory/changelog-parser@v1.0.2
with:
path: CHANGELOG_RU.md
- name: Changelog Parser
id: changelog_en
uses: coditory/changelog-parser@v1.0.2
with:
path: CHANGELOG_EN.md
- name: Changelog Parser
id: changelog_mods
uses: coditory/changelog-parser@v1.0.2
with:
path: MODS.md
discord-message:
name: Discord Message
needs: [modpack-info]
runs-on: ubuntu-latest
steps:
- name: Send Discord message
uses: tsickert/discord-webhook@v5.4.0
with:
webhook-url: ${{secrets.RELEASES_1_20}}
username: "TerraFirmaGreg"
avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/curseforge.png"
embed-title: Release 0.6.4
embed-url: https://github.com/${{ github.repository }}/releases/tag/0.6.4
embed-thumbnail-url: https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo.png
embed-description: |
**Release Type**: `${{ env.RELEASE_TYPE }}`
**GameVersion**: `1.20.1`
**Website Link**: [CurseForge](https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/5047541)
**Changelog**
:flag_ru:
```${{ needs.modpack-info.outputs.changelog_ru }}```
:flag_gb:
```${{ needs.modpack-info.outputs.changelog_en }}```
embed-color: 5814783
# close-fixed-issues:
# name: Close Fixed Issues
# needs: [modpack-info, release-github, release-curseforge]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4.1.1
# - name: Сlose fixed in dev
# uses: juraj-hrivnak/close-issues-based-on-label@master
# env:
# LABEL: "2. Status: Fixed in Dev"
# VERSION: ${{ needs.modpack-info.outputs.project_version }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}