Skip to content

max # awp per team #379

max # awp per team

max # awp per team #379

Workflow file for this run

name: Build RetakesAllocator.zip
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore Dependencies
run: dotnet restore
- name: Test
run: dotnet test
- name: Build
shell: bash
run: dotnet build --no-restore -c Release
- name: Package
working-directory: ${{github.workspace}}/RetakesAllocator/
run: chmod +x release.bash; ./release.bash
- name: Publish Archive for Branch
uses: actions/upload-artifact@v4
if: "!startsWith(github.ref, 'refs/tags/')"
with:
name: RetakesAllocator-${{github.sha}}
path: ${{github.workspace}}/RetakesAllocator/bin/Release/RetakesAllocator
- name: Publish Archive for Release
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: RetakesAllocator-${{github.ref_name}}
path: ${{github.workspace}}/RetakesAllocator/bin/Release/RetakesAllocator
release:
needs: build
permissions: write-all
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v4
name: Fetch Artifact
with:
name: RetakesAllocator-${{github.ref_name}}
path: ${{github.workspace}}/RetakesAllocator/
- name: Create Archive
run: zip -r RetakesAllocator-${{github.ref_name}}.zip RetakesAllocator
- name: Get Release Info
run: |
RELEASE_INFO=$(curl -sH 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/${{ github.repository }}/releases)
export UPLOAD_URL=$(echo $RELEASE_INFO | jq -r ".[] | select(.tag_name == \"${{ github.event.release.tag_name }}\").upload_url")
echo "UPLOAD_URL=$UPLOAD_URL" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./RetakesAllocator-${{github.ref_name}}.zip
asset_name: "cs2-retakes-allocator-${{ github.event.release.tag_name }}.zip"
asset_content_type: application/zip