Skip to content

Publish Release

Publish Release #25

Workflow file for this run

name: Publish Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version number'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- run: echo "URL=$(curl -vs https://builds.bepinex.dev/projects/bepinex_be 2>&1 | grep -Po '(?<=href=")(\/projects\/bepinex_be\/(.*)\/BepInEx-Unity.IL2CPP-win-x64(.*))(?=")' | head -1)" >> $GITHUB_OUTPUT
id: bepinexurl
- run: wget https://builds.bepinex.dev${{ steps.bepinexurl.outputs.URL}}
- run: mkdir -p ${{ github.event.repository.name }}/BepInEx/plugins
- run: dotnet build -c Release -o build
- run: cp build/${{ github.event.repository.name }}.dll ${{ github.event.repository.name }}/BepInEx/plugins/${{ github.event.repository.name }}.dll
- run: unzip BepInEx* -d ${{ github.event.repository.name }}
- run: touch ${{ github.event.repository.name }}/EXTRACT_TO_GAME_DIRECTORY
- run: cd ${{ github.event.repository.name }}; sudo zip -r ../${{ github.event.repository.name }}_${{ github.event.inputs.version }}.zip ./*
- uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.event.repository.name }}_${{ github.event.inputs.version }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.version }}
name: "${{ github.event.inputs.version }}"
draft: true
generateReleaseNotes: true
bodyFile: "release_body.md"
artifactErrorsFailBuild: true