-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15ddec6
commit 2c4c6cd
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
PROJECT_PATH: "BombsiteAnnouncer.csproj" | ||
PROJECT_NAME: "BombsiteAnnouncer" | ||
OUTPUT_PATH: "./BombsiteAnnouncer" | ||
|
||
jobs: | ||
build: | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.0.x | ||
- name: Restore | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build ${{ env.PROJECT_PATH }} -c VIP -o ${{ env.OUTPUT_PATH }} | ||
|
||
publish: | ||
if: github.event_name == 'push' | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.0.x | ||
- name: Restore | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build ${{ env.PROJECT_PATH }} -c VIP -o ${{ env.OUTPUT_PATH }} | ||
- name: Clean files | ||
run: | | ||
rm -f \ | ||
${{ env.OUTPUT_PATH }}/CounterStrikeSharp.API.dll \ | ||
${{ env.OUTPUT_PATH }}/McMaster.NETCore.Plugins.dll \ | ||
${{ env.OUTPUT_PATH }}/Microsoft.DotNet.PlatformAbstractions.dll \ | ||
${{ env.OUTPUT_PATH }}/Microsoft.Extensions.DependencyModel.dll \ | ||
- name: Zip | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
filename: '${{ env.PROJECT_NAME }}.zip' | ||
path: ${{ env.OUTPUT_PATH }} | ||
- name: CS2-VipCasual | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: "${{ env.PROJECT_NAME }}.zip" | ||
name: "Build ${{ env.BUILD_NUMBER }}" | ||
tag: "build-${{ env.BUILD_NUMBER }}" | ||
body: | |