|
| 1 | +name: publish nuget |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - v* |
| 7 | + |
| 8 | +jobs: |
| 9 | + publish: |
| 10 | + name: publish-core |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + |
| 16 | + - name: Setup dotnet |
| 17 | + uses: actions/setup-dotnet@v1 |
| 18 | + with: |
| 19 | + dotnet-version: 8.0.* |
| 20 | + include-prerelease: true |
| 21 | + - name: Package |
| 22 | + run: dotnet build -c Release -o . src/OpenTask.Core/OpenTask.Core.csproj |
| 23 | + - name: Publish |
| 24 | + run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate |
| 25 | + |
| 26 | + # Publish |
| 27 | + # - name: publish on version change |
| 28 | + # id: publish_nuget |
| 29 | + # uses: brandedoutcast/publish-nuget@v2 |
| 30 | + # with: |
| 31 | + # # Filepath of the project to be packaged, relative to root of repository |
| 32 | + # PROJECT_FILE_PATH: src/OpenTask.Core/OpenTask.Core.csproj |
| 33 | + # VERSION_STATIC: ${{ github.ref }} |
| 34 | + |
| 35 | + # NUGET_KEY: ${{secrets.NUGET_API_KEY}} |
| 36 | + |
| 37 | + # Configuration to build and package |
| 38 | + # BUILD_CONFIGURATION: Release |
| 39 | + |
| 40 | + # Platform target to compile (default is empty/AnyCPU) |
| 41 | + # BUILD_PLATFORM: x64 |
| 42 | + |
| 43 | + # NuGet package id, used for version detection & defaults to project name |
| 44 | + # PACKAGE_NAME: Core |
| 45 | + |
| 46 | + # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH |
| 47 | + # VERSION_FILE_PATH: Directory.Build.props |
| 48 | + |
| 49 | + # Regex pattern to extract version info in a capturing group |
| 50 | + # VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$ |
| 51 | + |
| 52 | + # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX |
| 53 | + # VERSION_STATIC: 1.0.0 |
| 54 | + |
| 55 | + # Flag to toggle git tagging, enabled by default |
| 56 | + # TAG_COMMIT: true |
| 57 | + |
| 58 | + # Format of the git tag, [*] gets replaced with actual version |
| 59 | + # TAG_FORMAT: v* |
| 60 | + |
| 61 | + # API key to authenticate with NuGet server |
| 62 | + # NUGET_KEY: ${{secrets.NUGET_API_KEY}} |
| 63 | + |
| 64 | + # NuGet server uri hosting the packages, defaults to https://api.nuget.org |
| 65 | + # NUGET_SOURCE: https://api.nuget.org |
| 66 | + |
| 67 | + # Flag to toggle pushing symbols along with nuget package to the server, disabled by default |
| 68 | + # INCLUDE_SYMBOLS: false |
| 69 | + |
| 70 | + |
0 commit comments