Skip to content

Instantly share code, notes, and snippets.

@thepwrtank18
Created December 19, 2021 03:41
Show Gist options
  • Save thepwrtank18/e2b91617124d45bf4876d52dce7319a3 to your computer and use it in GitHub Desktop.
Save thepwrtank18/e2b91617124d45bf4876d52dce7319a3 to your computer and use it in GitHub Desktop.

Revisions

  1. thepwrtank18 created this gist Dec 19, 2021.
    44 changes: 44 additions & 0 deletions actions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    Here is the Actions code:

    ```yaml
    name: Build App

    on: [push]

    jobs:
    build:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v1
    name: Checkout Code

    - name: Setup MSBuild Path
    uses: warrenbuckley/Setup-MSBuild@v1
    env:
    ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

    - name: Setup NuGet
    uses: NuGet/[email protected]
    env:
    ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

    - name: Restore NuGet Packages
    run: nuget restore {{REPLACEWITHSOLUTIONNAME}}}.sln

    - name: Build and Publish App
    run: msbuild {{REPLACEWITHSOLUTIONNAME}}}.sln /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile

    - name: Upload Artifact
    uses: actions/[email protected]
    env:
    ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
    with:
    name: SkyrimSELauncher_fake
    path: \bin\Release
    ```
    Note that the first time, this will fail.
    \
    However, in the logs, it shows the actual directory of the project's build (for example, `D:\a\{{REPLACEWITHSOLUTIONNAME}}\{{REPLACEWITHSOLUTIONNAME}}\{{REPLACEWITHSOLUTIONNAME}}\bin\Release`). Replace `\Bin\Release` at the end of the project with that, then run it again.