Skip to content

Create Release

Create Release #26

Workflow file for this run

permissions:
contents: write
packages: write
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
description: "Version"
name:
type: string
required: false
description: "Title"
description:
type: string
required: true
description: "Description of changes"
default: ""
release-rml:
type: boolean
required: false
description: "Release for ResoniteModLoader"
default: true
release-monkey:
type: boolean
required: false
description: "Release for MonkeyLoader"
default: true
env:
NUGET_PUBLISH_TARGET: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
ARTIFACT_NAME: SampleMod
RML_MANIFEST_TOKEN: "${{ secrets.RML_MANIFEST_TOKEN }}"
name: "Create Release"
jobs:
compile-rml:
if: ${{ inputs.release-rml }}
uses: ./.github/workflows/build-rml.yml
with:
RELEASE_VERSION: "${{ inputs.version }}"
RELEASE_NOTES: "${{ inputs.description }}"
secrets:
RESONITE_CLONE_TOKEN: "${{ secrets.RESONITE_CLONE_TOKEN }}"
compile-monkey:
if: ${{ inputs.release-monkey }}
uses: ./.github/workflows/build-monkey.yml
with:
RELEASE_VERSION: "${{ inputs.version }}"
RELEASE_NOTES: "${{ inputs.description }}"
secrets:
RESONITE_CLONE_TOKEN: "${{ secrets.RESONITE_CLONE_TOKEN }}"
create-github-release:
if: ${{ inputs.release-rml }}
runs-on: ubuntu-latest
needs: compile-rml
steps:
- name: Download RML build artifacts
uses: actions/download-artifact@v3.0.2
with:
name: "${{ env.ARTIFACT_NAME }}-ResoniteModLoader"
path: "tmp/"
- name: Create release
uses: "ncipollo/release-action@v1.13.0"
with:
artifactErrorsFailBuild: true
artifacts: "tmp/**.*"
body: "${{ inputs.description }}"
name: "${{ inputs.name || inputs.version }}"
tag: "v${{ inputs.version }}"
commit: "${{ github.ref }}"
push-rml-manifest:
if: "${{ env.RML_MANIFEST_TOKEN != '' }}"

Check failure on line 73 in .github/workflows/create-release.yml

View workflow run for this annotation

GitHub Actions / Create Release

Invalid workflow file

The workflow is not valid. .github/workflows/create-release.yml (Line: 73, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RML_MANIFEST_TOKEN != '' .github/workflows/create-release.yml (Line: 80, Col: 27): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RML_MANIFEST_TOKEN
uses: ./.github/workflows/push-rml-manifest.yml
needs: create-github-release
with:
RELEASE_VERSION: "${{ inputs.version }}"
RELEASE_NOTES: "${{ inputs.description }}"
secrets:
RML_MANIFEST_TOKEN: "${{ env.RML_MANIFEST_TOKEN }}"
push-nuget:
if: ${{ inputs.release-monkey }}
runs-on: ubuntu-latest
needs: compile-monkey
steps:
- name: Download NuGet package build artifacts
uses: actions/download-artifact@v3.0.2
with:
name: "${{ env.ARTIFACT_NAME }}-MonkeyLoader"
path: "tmp/"
- name: Add repo owner's NuGet package source
run: dotnet nuget add source --username "${{ github.repository_owner }}" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text --name "publish_target" "${{ env.NUGET_PUBLISH_TARGET }}"
- name: Publish to NuGet feed
run: dotnet nuget push "tmp/**.nupkg" --api-key "${{ secrets.GITHUB_TOKEN }}" --source "publish_target"