https://github.com/ikkentim/SampSharp-build
SampSharp shared build script code. Can possibly also be used with projects other than SampSharp.
https://github.com/ikkentim/SampSharp-build
gta-sa gtasa sa-mp sa-mp-development sa-mp-server sampsharp
Last synced: 3 months ago
JSON representation
SampSharp shared build script code. Can possibly also be used with projects other than SampSharp.
- Host: GitHub
- URL: https://github.com/ikkentim/SampSharp-build
- Owner: ikkentim
- License: apache-2.0
- Archived: true
- Created: 2016-09-18T12:39:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T20:54:03.000Z (almost 5 years ago)
- Last Synced: 2024-08-04T12:01:15.276Z (about 1 year ago)
- Topics: gta-sa, gtasa, sa-mp, sa-mp-development, sa-mp-server, sampsharp
- Language: C#
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SampSharp-build
SampSharp shared build script code. Can possibly also be used with projects other than SampSharp.Setup
=====
1. Stick the contents of the `root` directory into the root of your project
1. Configure `build.cake` in your project root
1. Add this repository as a submodule using `git submodule add https://github.com/ikkentim/SampSharp-build.git cake`
1. Add `tools/` to your `.gitignore`
1. Add the following environment variables to the AppVeyor settings for your repository:
- **NUGET_KEY**: The NuGet key to publish with
- **GITHUB_TOKEN**: The GitHub token to use to publish a release
1. Make sure your projects are at src/PROJECTNAME/PROJECTNAME.csproj
1. Install the dotnet-cake tool: `dotnet tool install Cake.Tool`
1. Add a GitHub Action to the project
1. Make sure your project is configured to build (in release mode) to `repo-root/bin`
1. Add the following to your csproj files:
```xml
0.0.0-localbuild
0.0.0
placeholder
true
true
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
true
```
GitHub Action
=============
This template works as a good base, you possibly need to tweak it.```yml
name: Cake
on:
push:
branches: [ master ]
paths:
- src/**
- CHANGES.mdpull_request:
branches: [ master ]
paths:
- .github/workflows
- src/**
- CHANGES.mdworkflow_dispatch:
jobs:
build:
runs-on: windows-lateststeps:
- name: Checkout repo
uses: actions/checkout@v2- name: Checkout submodules
run: git submodule update --init --recursive- name: Run the Cake script
uses: cake-build/cake-action@v1
with:
script-path: build.cake
target: CI- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: nuget-packages
path: |
bin/Release/*.nupkg
bin/**/*.dll
bin/**/*.pdb
bin/**/*.xml
```Building
========
- Run `dotnet cake` to build.Creating New Releases
=====================
1. Update your CHANGES.md (see [versioning](#versioning)).
1. Create a git tag: `git tag `. If you want to create a prerelease, use `-alpha` as tag. You can also number your prereleases like `-alpha2`.
1. Push your tags, `git push --tags` and the GitHub Action will take care of the rest.Example of usage: [ikkentim/SampSharp](https://github.com/ikkentim/SampSharp)