This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
Publish Release #25
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 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 |