Skip to content

Commit

Permalink
add gha
Browse files Browse the repository at this point in the history
  • Loading branch information
c6-dev committed Jan 15, 2025
1 parent cd8b532 commit f444b17
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: MSBuild

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

env:
SOLUTION_FILE_PATH: JG/johnnyguitar.sln

permissions:
contents: read

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build Release
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=Release ${{env.SOLUTION_FILE_PATH}} /p:PostBuildEventUseInBuild=false

- name: Build Debug
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=Debug ${{env.SOLUTION_FILE_PATH}} /p:PostBuildEventUseInBuild=false

- name: Generate Timestamp
run: |
timestamp=$(date +"%Y%m%d%H%M%S")
echo "artifact_timestamp=$timestamp" >> $GITHUB_ENV
shell: bash

- name: Publish Release
uses: actions/upload-artifact@v4
with:
name: JohnnyGuitarNVSE-Release-${{ env.artifact_timestamp }}
path: |
Release\johnnyguitar.dll
- name: Publish Debug
uses: actions/upload-artifact@v4
with:
name: JohnnyGuitarNVSE-Debug-${{ env.artifact_timestamp }}
path: |
Debug\johnnyguitar.dll

0 comments on commit f444b17

Please sign in to comment.