Skip to content

fix

fix #3

Workflow file for this run

name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
determine_version:
runs-on: ubuntu-24.04
outputs:
full_version: ${{ steps.version.outputs.full_version }}
steps:
- uses: actions/checkout@v4
- name: Determine version
id: version
run: |
BASE_VERSION="6.0.0-pre.2"
TIMESTAMP=$(date +%Y%m%d%H%M%S)
FULL_VERSION="${BASE_VERSION}-build.${TIMESTAMP}.${{ github.run_id }}"
echo "full_version=${FULL_VERSION}" >> $GITHUB_OUTPUT
build_bepinex:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: BepInEx/BepInEx
ref: 53625800b86f6c68751445248260edf0b27a71c2 # v6.0.0-pre.2
path: BepInEx
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- run: find ../patches -type f -name "*.patch" -exec bash -c "patch -p1 < {}" \;
working-directory: BepInEx
- run: ./build.sh --target Publish
working-directory: BepInEx
- uses: actions/upload-artifact@v4
with:
path: "./BepInEx/bin/dist/*.zip"
name: "BepInEx_CI"
if-no-files-found: error
create_draft_release:
runs-on: ubuntu-24.04
needs: [determine_version, build_bepinex]
if: github.event_name == 'workflow_dispatch'
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: "BepInEx_CI"
- uses: actions/attest-build-provenance@v2
id: attest
with:
subject-path: "*.zip"
- name: Create Draft Release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="v${{ needs.determine_version.outputs.full_version }}"
gh release create "$VERSION" \
--draft \
--title "$VERSION" \
--notes "Draft release created by workflow_dispatch\n\n<small>🤓 Attestation: ${{ steps.attest.outputs.attestation-url }}</small>" \
*.zip