A lot of changes and a more reponsible engineer would break these out into concise PRs but I'm not that guy and write titles that are way too long #686
Workflow file for this run
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: .NET Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: xXx_set_env_variables_xXx | |
run: echo "GIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
include-prerelease: true | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release /p:DebugType=None | |
- name: Rename executables | |
working-directory: /home/runner/work/Obsidian/Obsidian/Obsidian.ConsoleApp/bin/Release/net8.0/ | |
run: | | |
mv Obsidian.ConsoleApp.dll ObsidianApp.dll | |
mv Obsidian.ConsoleApp.deps.json ObsidianApp.deps.json | |
mv Obsidian.ConsoleApp.runtimeconfig.json ObsidianApp.runtimeconfig.json | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: Obsidian-Nightly-Build | |
path: /home/runner/work/Obsidian/Obsidian/Obsidian.ConsoleApp/bin/Release/net8.0/ | |
if: ${{ github.event_name == 'push' }} # Only upload artifacts on push, don't upload them for PRs | |
- name: Discord Webhook Action | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.BUILD_WEBHOOK }} | |
embed-title: New Obsidian build available! | |
embed-description: | | |
Developer: [`${{ github.actor }}`](https://github.com/${{ github.actor }}) | |
GH Actions Run: [`${{ github.run_id }}`](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}) _(Download under "artifacts")_ | |
Commit SHA: [`${{ github.sha }}`](https://github.com/${{github.repository}}/commit/${{github.sha}}) | |
embed-color: 2424876 | |
embed-footer-text: "Obsidian, A C# implementation of the Minecraft server protocol." | |
if: ${{ github.event_name == 'push' }} # Only publish webhook on push. |