v1.37.0 Gas Turbine buff & other fixes #85
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- 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: "💻 Upload Client" | |
uses: itsmeow/curseforge-upload@v3 | |
id: client | |
with: | |
release_type: release | |
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: release | |
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 }}" |