-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (46 loc) · 1.76 KB
/
Release_Deploy.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
name: Github Release and Nuget Deploy
on:
workflow_dispatch:
inputs:
version:
description: 'Plugin SemVer:'
required: true
update_notes:
default: "-"
description: "Update Notes to Release"
required: true
jobs:
release_deploy:
name: "OpenMod Economy Release/Deployment"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
dotnet-version: 8.0.200
- name: Restore dependencies
run: dotnet restore OpenMod.Economy
- name: Update version
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" OpenMod.Economy/OpenMod.Economy.csproj"
- name: Build Project
run: dotnet build OpenMod.Economy --configuration Release --no-restore
- name: Push to NuGet
run: dotnet nuget push OpenMod.Economy/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
- name: Release
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IS_PRE_RELEASE: ${{ endsWith(github.event.inputs.version, '-alpha') || endsWith(github.event.inputs.version, '-beta') || endsWith(github.event.inputs.version, '-rc') }}
with:
body: |
Install: openmod install Openmod.Economy
Nuget: https://www.nuget.org/packages/OpenMod.Economy
Notes:
${{ github.event.inputs.update_notes }}
name: OpenMod.Economy v${{ github.event.inputs.version }}
prerelease: ${{ env.IS_PRE_RELEASE }}
tag_name: V${{ github.event.inputs.version }}