Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
negrifelipe committed Dec 17, 2021
1 parent 859c189 commit fe6c2d6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deployment

on:
workflow_dispatch:
inputs:
version:
description: 'Plugin Version (SemVer: https://semver.org)'
required: true
jobs:
deploy:
name: "NuGet Deployment"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout Repository
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.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>#\" Feli.OpenMod.AdvancedCosmetics/Feli.OpenMod.AdvancedCosmetics.csproj"
- name: Update assembly version
run: "sed -i \"s#<AssemblyVersion>0.0.0</AssemblyVersion>#<AssemblyVersion>${{ github.event.inputs.version }}</AssemblyVersion>#\" Feli.OpenMod.AdvancedCosmetics/Feli.OpenMod.AdvancedCosmetics.csproj"
- name: Build
run: dotnet build Feli.OpenMod.AdvancedCosmetics/Feli.OpenMod.AdvancedCosmetics.csproj --configuration Release --no-restore
- name: Push to NuGet
run: dotnet nuget push Feli.OpenMod.AdvancedCosmetics/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyVersion>2.0.0</AssemblyVersion>
<AssemblyVersion>0.0.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -16,7 +16,7 @@
<PackageAuthor>Feli</PackageAuthor>
<PackageTags>openmod openmod-plugin unturned</PackageTags>
<!-- XXX can be unturned, unityengine or universal depending on your plugin -->
<Version>2.0.0</Version>
<Version>0.0.0</Version>
<!-- Your plugins version. Must be semversion, see https://semver.org/ -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNugetPackage>true</GenerateNugetPackage>
Expand Down

0 comments on commit fe6c2d6

Please sign in to comment.