Skip to content

publish

publish #5

Workflow file for this run

name: publish
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: 17
cache: 'gradle'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build files
run: ./gradlew build
- name: read mod name, mod version and minecraft version
id: properties
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
properties: 'archives_base_name mod_version minecraft_version'
- uses: Kir-Antipov/[email protected]
with:
modrinth-featured: true
modrinth-unfeature-mode: subset
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
name: '${{ steps.properties.outputs.archives_base_name }}-${{ steps.properties.outputs.mod_version }}+${{ steps.properties.outputs.minecraft_version }}'
version: '${{ steps.properties.outputs.mod_version }}+${{ steps.properties.outputs.minecraft_version }}'
game-versions: |
${{ steps.properties.outputs.minecraft_version }}
version-type: release
version-resolver: exact
dependencies: |
fabric-api | depends | *
cloth-config | depends | *
libz | depends | *
changelog-file: CHANGELOG.md
retry-attempts: 2
retry-delay: 10000
fail-mode: fail
- name: read changelog
id: changelog
uses: juliangruber/read-file-action@v1
with:
path: 'CHANGELOG.md'
- name: discord webhook
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
embed-title: "${{ steps.properties.outputs.archives_base_name }} ${{ steps.properties.outputs.mod_version }} for Minecraft ${{ steps.properties.outputs.minecraft_version }} has been released!"
embed-description: "**Changelog**```md\n${{ steps.changelog.outputs.content }}```\n**Downloads**\n<:modrinth:1110118061106798644> https://modrinth.com/mod/${{ steps.properties.outputs.archives_base_name }}\n<:curseforge:1110124796362109028> https://www.curseforge.com/minecraft/mc-mods/${{ steps.properties.outputs.archives_base_name }}"
embed-footer-text: "Have fun and be blessed!"
embed-color: 0xFF8000