Skip to content

latest

latest #43

Workflow file for this run

name: Build the plugin
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
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: 7.0.x
- name: Build
run: dotnet build
- name: Create output directory
run: |
mkdir -p output/RetakesPlugin
mv ./bin/Debug/net7.0/RetakesPlugin.dll output/RetakesPlugin/
mv ./map_configs output/RetakesPlugin/
mv ./lang output/RetakesPlugin/
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: RetakesPlugin-${{ github.sha }}
path: output
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: RetakesPlugin-${{ github.sha }}
- name: whats going on
run: ls -l
- name: Zip RetakesPlugin directory
run: zip -r RetakesPlugin-${{ github.sha }}.zip ./RetakesPlugin
- name: whats going on 2.0
run: ls -l
- name: Get Release Info
id: 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
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./RetakesPlugin-${{ github.sha }}.zip
asset_name: "cs2-retakes-${{ github.event.release.tag_name }}.zip"
asset_content_type: application/zip