Skip to content

v2.1.1

v2.1.1 #3

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
- name: Update xmake repository and install dependencies
run: |
xmake.exe repo --update
xmake.exe q --yes
- name: Build and Package
run: |
xmake.exe build
xmake.exe package
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: package
path: build/package/
release-github:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Set environment variables
uses: antifree/json-to-variables@v1.0.1
with:
filename: metadata.json
prefix: META
- name: Download Artifact
uses: actions/download-artifact@v2.0.9
- name: Create zip
uses: ihiroky/archive-action@v1
with:
root_dir: "package/"
file_path: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
- name: Upload to Github Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
artifacts: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ github.event.release.prerelease }}
release-nexus:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Update release note
uses: jossef/action-set-json-field@v1
with:
file: metadata.json
field: UNEX_FILEDESCRIPTION
value: ${{ github.event.release.body }}
- name: Set environment variables
uses: antifree/json-to-variables@v1.0.1
with:
filename: metadata.json
prefix: META
- name: Download Artifact
uses: actions/download-artifact@v2.0.9
- name: Create zip
uses: ihiroky/archive-action@v1
with:
root_dir: "package/"
file_path: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Upload to Nexus Mods
env:
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
UNEX_COOKIES: ${{ secrets.UNEX_COOKIES }}
UNEX_GAME: ${{ env.META_UNEX_GAME }}
UNEX_MODID: ${{ env.META_UNEX_MODID }}
UNEX_PREVIOUSFILE: auto
UNEX_FILENAME: ${{ env.META_UNEX_FILENAME }}
UNEX_FILEDESCRIPTION: ${{ github.event.release.body }}
UNEX_FILEPATH: ${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip
UNEX_VERSION: ${{ github.event.release.tag_name }}
run: |
dotnet tool install -g NexusUploader
unex upload $UNEX_MODID $UNEX_FILEPATH -v $UNEX_VERSION
release-3dm:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Set environment variables
uses: antifree/json-to-variables@v1.0.1
with:
filename: metadata.json
prefix: META
- name: Download Artifact
uses: actions/download-artifact@v2.0.9
- name: Upload to 3DM Mods
id: upload_3dm
uses: GlossMod/ActionUpdateMod@v1
with:
appid: ${{ secrets.APPID_3DM }}
appkey: ${{ secrets.APPKEY_3DM }}
id: ${{ env.META_3DM_MOD_ID }}
title: ${{ env.META_3DM_MOD_TITLE }}
version: ${{ github.event.release.tag_name }}
tags: ${{ env.META_3DM_MOD_TAGS }}
desc: ${{ env.META_3DM_MOD_DESC }}
content: ${{ env.META_3DM_MOD_CONTENT }}
file: package/
- name: Check 3DM upload status
run: "echo 'Code: ${{ steps.test3.outputs.code }}\tMessage: ${{ steps.test3.outputs.msg }}'"