Skip to content

Commit 35f5885

Browse files
committed
Fix CI: thanks mini
1 parent fafe8ab commit 35f5885

File tree

1 file changed

+6
-43
lines changed

1 file changed

+6
-43
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: CI
22

3-
on:
4-
push:
5-
pull_request:
6-
create:
7-
tags:
8-
- "*"
3+
on: [ "push", "pull_request" ]
94

105
jobs:
116
build:
@@ -19,7 +14,7 @@ jobs:
1914
- name: Setup .NET
2015
uses: actions/setup-dotnet@v2
2116
with:
22-
dotnet-version: 9.x
17+
dotnet-version: 8.x
2318

2419
- name: Run the Cake script
2520
uses: cake-build/cake-action@v1
@@ -31,40 +26,8 @@ jobs:
3126
name: CrowdedMod.dll
3227
path: src/CrowdedMod/bin/Release/net6.0/CrowdedMod.dll
3328

34-
release:
35-
needs: build
36-
if: startsWith(github.ref, 'refs/tags/')
37-
runs-on: ubuntu-20.04
38-
39-
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v3
42-
43-
- name: Download built artifact
44-
uses: actions/download-artifact@v4
45-
with:
46-
name: CrowdedMod.dll
47-
path: artifacts/
48-
49-
- name: Get tag name
50-
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
51-
52-
- name: Create GitHub Release
53-
uses: actions/create-release@v1
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
with:
57-
tag_name: ${{ env.TAG_NAME }}
58-
release_name: Release ${{ env.TAG_NAME }}
59-
draft: false
60-
prerelease: false
61-
62-
- name: Upload Release Asset
63-
uses: actions/upload-release-asset@v1
64-
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- uses: softprops/action-gh-release@v1
30+
if: github.ref_type == 'tag'
6631
with:
67-
upload_url: ${{ steps.create-release.outputs.upload_url }}
68-
asset_path: artifacts/CrowdedMod.dll
69-
asset_name: CrowdedMod.dll
70-
asset_content_type: application/octet-stream
32+
draft: true
33+
files: src/CrowdedMod/bin/Release/net6.0/CrowdedMod.dll

0 commit comments

Comments
 (0)