Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DiFFoZ committed Jun 21, 2021
2 parents 1b8a13b + 045cce6 commit c837193
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Build project and Push to NuGet'
on:
workflow_dispatch:
inputs:
version:
description: 'Plugin Version (SemVer: https://semver.org)'
required: true
is_prerelease:
default: false
description: 'Push to NuGet as a prerelease version'
required: true
update_notes:
default: "-"
description: "Update Notes to Release"
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>#\" Deps.props"
- name: Update package version
run: "sed -i \"s#<PackageVersion>0.0.0</PackageVersion>#<PackageVersion>${{ github.event.inputs.version }}</PackageVersion>#\" Deps.props"
- name: Update informational version
run: "sed -i \"s#<InformationalVersion>0.0.0</InformationalVersion>#<InformationalVersion>${{ github.event.inputs.version }}</InformationalVersion>#\" Deps.props"
- name: Build
run: dotnet build EvolutionPlugins.Universal.Extras.sln --configuration Release --no-restore
- name: 'Deploy to NuGet EvolutionPlugins.Universal.Extras'
run: dotnet nuget push EvolutionPlugins.Universal.Extras/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
- name: 'Deploy to NuGet EvolutionPlugins.Universal.Extras.Unturned'
run: dotnet nuget push EvolutionPlugins.Universal.Extras.Unturned/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 library plugin with command: `EvolutionPlugins.Universal.Extras`
NuGet: https://www.nuget.org/packages/EvolutionPlugins.Universal.Extras & https://www.nuget.org/packages/EvolutionPlugins.Universal.Extras.Unturned
Changelog:
${{ github.event.inputs.update_notes }}
release_name: EvolutionPlugins.Universal.Extras v${{ github.event.inputs.version }}
tag_name: v${{ github.event.inputs.version }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 DiFFoZ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit c837193

Please # to comment.