Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Publish Release

Publish Release #22

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 "::set-output name=URL::$(curl -vs https://builds.bepinex.dev/projects/bepinex_be 2>&1 | grep -Po '(?<=href=")(\/projects\/bepinex_be\/(.*)\/BepInEx_UnityIL2CPP_x64(.*))(?=")' | head -1)"
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 }}; 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