Skip to content

v1.51.1 FIT server log hotfix #113

v1.51.1 FIT server log hotfix

v1.51.1 FIT server log hotfix #113

Workflow file for this run

name: Publishing on CurseForge
on:
workflow_dispatch:
release:
types: [released]
jobs:
cf-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: release
uses: gregziegan/[email protected]
- name: πŸ“ƒ Save changelog content to file
uses: DamianReeves/write-file-action@master
with:
path: latest_release.md
contents: ${{ steps.release.outputs.body }}
write-mode: overwrite
- uses: actions/setup-node@v3
with:
node-version: 18
- name: πŸ–ΌοΈ Generate image from md
run: npx mdimg -i latest_release.md -o latest.png -w 800 --css githubDark
- name: πŸ–ΌοΈ ➑️ Send discord message
uses: MineBartekSA/discord-webhook@v2
with:
webhook: ${{ secrets.WEBHOOK_URL }}
username: πŸš€ New release
avatar_url: https://media.forgecdn.net/avatars/820/88/638200951256555174.png
embed: |
- title: __**${{ steps.release.outputs.name }}**__
url: ${{ steps.release.outputs.html_url }}
attachment: |
file: latest.png
continue-on-error: true
- run: npm i --omit=dev
- name: πŸ“‹ Generate html instead of markdown
run: node dev/lib/curseforge-md-to-html.js latest_release.md
- name: ‡️ Prepend Header to HTML
run: |
echo -e '<p><a href="https://github.com/Krutoy242/Enigmatica2Expert-Extended/releases">Changelog</a> ● <a href="https://github.com/Krutoy242/Enigmatica2Expert-Extended/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug">Known Bugs</a> ● <a href="https://github.com/Krutoy242/Enigmatica2Expert-Extended#considerations-before-updating">Update Caution</a></p>' | cat - latest_release.html > temp && mv temp latest_release.html
- name: πŸ“‹ Get content of changelog html
id: latest_html
uses: andstor/file-reader-action@v1
with:
path: latest_release.html
- name: πŸ’½ Download .zip files from latest release
uses: robinraju/[email protected]
with:
latest: true
fileName: '*.zip'
- name: πŸ…± Determine release type
id: release_type
run: |
if [[ "${{ steps.release.outputs.tag_name }}" == *"-beta"* ]]; then
echo "release_type=beta" >> $GITHUB_ENV
elif [[ "${{ steps.release.outputs.tag_name }}" == *"-alpha"* ]]; then
echo "release_type=alpha" >> $GITHUB_ENV
else
echo "release_type=release" >> $GITHUB_ENV
fi
- name: πŸ’» Upload Client
uses: itsmeow/curseforge-upload@v3
id: client
with:
release_type: ${{ env.release_type }}
display_name: 'E2E-Extended-${{ steps.release.outputs.tag_name }}'
file_path: 'E2E-Extended-${{ steps.release.outputs.tag_name }}.zip'
game_endpoint: minecraft
game_versions: 'Minecraft 1.12:1.12.2'
project_id: '561105'
token: '${{ secrets.CURSEFORGE_API_TOKEN }}'
changelog_type: html
changelog: '${{ steps.latest_html.outputs.contents }}'
- name: πŸ–₯️ Upload Server
uses: itsmeow/curseforge-upload@v3
with:
release_type: ${{ env.release_type }}
display_name: 'E2E-Extended-${{ steps.release.outputs.tag_name }}-server'
file_path: 'E2E-Extended-${{ steps.release.outputs.tag_name }}-server.zip'
game_endpoint: minecraft
project_id: '561105'
parent_file_id: ${{ steps.client.outputs.id }}
token: '${{ secrets.CURSEFORGE_API_TOKEN }}'