Skip to content

ci: 👷

ci: 👷 #6

Workflow file for this run

name: .NET Build
on:
push:
branches: ["master", "feature/ci"]
create:
tags:
- 'v*'
env:
AppId: 2519830
ProjectName: ResoniteMetricsCounter
ArtifactDLL: ResoniteMetricsCounter.dll
Configuration: Release
jobs:
build:
runs-on: windows-latest
steps:
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Setup SteamCMD
uses: CyberAndrii/[email protected]
- id: checkout
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache app
uses: actions/cache@v4
with:
path: ${{ steps.checkout.outputs.repositoryPath }}/${{ env.ProjectName }}/Resonite/
key: app-runtime-2
- name: Update app
run: steamcmd +force_install_dir ${{ steps.checkout.outputs.repositoryPath }}/${{ env.ProjectName }}/Resonite +login ${{ secrets.STEAMLOGIN }} +app_update ${{ env.AppId }} validate +quit
- name: Install ResoniteModLoader
uses: suisei-cn/actions-download-file@v1
with:
url: https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/ResoniteModLoader.dll
target: ${{ steps.checkout.outputs.repositoryPath }}/${{ env.ProjectName }}/Resonite/Libraries/
- name: Install Harmony
uses: suisei-cn/actions-download-file@v1
with:
url: https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/0Harmony.dll
target: ${{ steps.checkout.outputs.repositoryPath }}/${{ env.ProjectName }}/Resonite/rml_libs/
- name: Restore the application
run: msbuild /t:Restore /p:Configuration=${{ env.Configuration }}
- name: Create the app package
run: msbuild /p:Configuration=${{ env.Configuration }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ArtifactDLL }}
path: ${{ env.ProjectName }}/bin/Release/net472/${{ env.ArtifactDLL }}
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.ArtifactDLL }}
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ env.ArtifactDLL }}
generate_release_notes: true