Publish to mod.io #2
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: Publish to mod.io | |
on: | |
workflow_dispatch: | |
inputs: | |
mod_version: | |
type: string | |
description: Mod version | |
required: true | |
jobs: | |
create_modio_package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Find and Replace MOD_VERSION_PLACEHOLDER | |
uses: jacobtomlinson/gha-find-replace@v2 | |
with: | |
find: "MOD_VERSION_PLACEHOLDER" | |
replace: ${{ github.event.inputs.mod_version }} | |
regex: false | |
- name: Build Mod | |
run: dotnet build --no-restore --configuration RELEASE -p:Version=${{ github.event.inputs.mod_version }} | |
- name: Create ModFolder folder | |
run: mkdir ModIoPackage | |
- name: Copy Mod | |
run: cp ./CustomNameList/bin/Release/netstandard2.1/CustomNameList.dll ModIoPackage | |
- name: Copy Mod.ci.json | |
run: cp ./CustomNameList/package/mod.ci.json ModIoPackage/mod.json | |
- name: Upload mod to Artifact | |
uses: actions/[email protected] | |
with: | |
name: CustomNameList_${{ github.event.inputs.mod_version }} | |
path: ModIoPackage | |
- name: Zip Release | |
uses: TheDoctor0/[email protected] | |
with: | |
filename: CustomNameList_${{ github.event.inputs.mod_version }}.zip | |
path: "./" | |
directory: ModIoPackage | |
- name: Test | |
uses: actions/[email protected] | |
with: | |
name: Test | |
path: ModIoPackage/CustomNameList_${{ github.event.inputs.mod_version }}.zip | |
- uses: nickelc/[email protected] | |
with: | |
token: ${{ secrets.MODIO_TOKEN }} | |
game: 3659 | |
mod: 2669290 | |
version: ${{ github.event.inputs.mod_version }} | |
path: ModIoPackage/CustomNameList_${{ github.event.inputs.mod_version }}.zip | |
active: true | |
changelog: "-" |