|
1 | | -# This is a basic workflow to help you get started with Actions |
2 | | - |
3 | | -name: CI |
4 | | - |
5 | | -# Controls when the action will run. |
| 1 | +name: publish to nuget |
6 | 2 | on: |
7 | | - # Triggers the workflow on push or pull request events but only for the master branch |
8 | 3 | push: |
9 | | - branches: [ master ] |
10 | | - pull_request: |
11 | | - branches: [ master ] |
12 | | - |
13 | | - # Allows you to run this workflow manually from the Actions tab |
14 | | - workflow_dispatch: |
15 | | - |
16 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 4 | + branches: |
| 5 | + - master # Default release branch |
17 | 6 | jobs: |
18 | | - # This workflow contains a single job called "build" |
19 | | - build: |
20 | | - # The type of runner that the job will run on |
| 7 | + publish: |
| 8 | + name: build, pack & publish |
21 | 9 | runs-on: ubuntu-latest |
22 | | - |
23 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
24 | 10 | steps: |
25 | | - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
26 | 11 | - uses: actions/checkout@v2 |
27 | 12 |
|
28 | | - # Runs a single command using the runners shell |
29 | | - - name: Run a one-line script |
30 | | - run: echo Hello, world! |
| 13 | + # - name: Setup dotnet |
| 14 | + # uses: actions/setup-dotnet@v1 |
| 15 | + # with: |
| 16 | + # dotnet-version: 3.1.200 |
| 17 | + |
| 18 | + # Publish |
| 19 | + - name: publish on version change |
| 20 | + id: publish_nuget |
| 21 | + uses: rohith/publish-nuget@v2 |
| 22 | + with: |
| 23 | + # Filepath of the project to be packaged, relative to root of repository |
| 24 | + PROJECT_FILE_PATH: Extensions/Extensions.csproj |
| 25 | + |
| 26 | + # NuGet package id, used for version detection & defaults to project name |
| 27 | + PACKAGE_NAME: Extension.Methods |
| 28 | + |
| 29 | + # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH |
| 30 | + # VERSION_FILE_PATH: Directory.Build.props |
| 31 | + |
| 32 | + # Regex pattern to extract version info in a capturing group |
| 33 | + VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$ |
| 34 | + |
| 35 | + # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX |
| 36 | + # VERSION_STATIC: 1.0.0 |
| 37 | + |
| 38 | + # Flag to toggle git tagging, enabled by default |
| 39 | + TAG_COMMIT: true |
| 40 | + |
| 41 | + # Format of the git tag, [*] gets replaced with actual version |
| 42 | + TAG_FORMAT: v* |
| 43 | + |
| 44 | + # API key to authenticate with NuGet server |
| 45 | + NUGET_KEY: ${{secrets.NUGET_API_KEY}} |
| 46 | + |
| 47 | + # NuGet server uri hosting the packages, defaults to https://api.nuget.org |
| 48 | + # NUGET_SOURCE: https://api.nuget.org |
31 | 49 |
|
32 | | - # Runs a set of commands using the runners shell |
33 | | - - name: Run a multi-line script |
34 | | - run: | |
35 | | - echo Add other actions to build, |
36 | | - echo test, and deploy your project. |
| 50 | + # Flag to toggle pushing symbols along with nuget package to the server, disabled by default |
| 51 | + # INCLUDE_SYMBOLS: false |
0 commit comments