-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (42 loc) · 1.91 KB
/
deployment.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
name: GitHub release and NuGet deploy
on:
workflow_dispatch:
inputs:
version:
description: 'Plugin Version (SemVer: https://semver.org)'
required: true
jobs:
deploy:
name: "NuGet Deployment"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore
- name: Update version
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" PermissionExtensions/PermissionExtensions.csproj"
- name: Update package version
run: "sed -i \"s#<PackageVersion>0.0.0</PackageVersion>#<PackageVersion>${{ github.event.inputs.version }}</PackageVersion>#\" PermissionExtensions/PermissionExtensions.csproj"
- name: Update informational version
run: "sed -i \"s#<InformationalVersion>0.0.0</InformationalVersion>#<InformationalVersion>${{ github.event.inputs.version }}</InformationalVersion>#\" PermissionExtensions/PermissionExtensions.csproj"
- name: Build
run: dotnet build PermissionExtensions/PermissionExtensions.csproj --configuration Release --no-restore
- name: Deploy to NuGet
run: dotnet nuget push PermissionExtensions/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
- name: Release to GitHub
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
Install plugin with command: `openmod install DiFFoZ.PermissionExtensions`
NuGet: https://www.nuget.org/packages/DiFFoZ.PermissionExtensions
release_name: DiFFoZ.PermissionExtensions v${{ github.event.inputs.version }}
tag_name: v${{ github.event.inputs.version }}