-
-
Notifications
You must be signed in to change notification settings - Fork 39
54 lines (49 loc) · 1.49 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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: Extract Release Version
id: extract-release-version
run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $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: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/RetakesPlugin.zip
asset_name: "cs2-retakes-${{ env.RELEASE_VERSION }}.zip"
asset_content_type: application/zip