Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to Nuget when new tag is pushed #12

Merged
merged 8 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Release to NuGet

on:
push:
tags:
- v*

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release

- name: Publish to NuGet
kfcampbell marked this conversation as resolved.
Show resolved Hide resolved
run: dotnet nuget push packaging/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }}
2 changes: 1 addition & 1 deletion GitHub.Octokit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Octokit", "src\GitHub.Octokit.csproj", "{C118D1F2-D47D-4488-9D2F-88BA4A7729BD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.NET.SDK", "src\Octokit.NET.SDK.csproj", "{C118D1F2-D47D-4488-9D2F-88BA4A7729BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Please use this project's [issues](https://github.com/octokit/dotnet-sdk/issues)

## Source organization

Currently this project is fairly simple (we hope it can stay that way). All of the package based source is contained in the `GitHub` folder.
Currently this project is fairly simple (we hope it can stay that way). All of the package based source is contained in the `GitHub` folder.

- **Authentication** - everything related to authenticating requests
- **Client** - the logic for constructing the plumbing to interact with the GitHub API
Expand All @@ -45,4 +45,4 @@ Currently this project is fairly simple (we hope it can stay that way). All of
* [Code of conduct](Docs/CODE_OF_CONDUCT.md)
* [Contributing](Docs/CONTRIBUTING.md)
* [Releases](Docs/RELEASES.md)
* [Incidents and security](Docs/SECURITY.md)
* [Incidents and security](Docs/SECURITY.md)
3 changes: 3 additions & 0 deletions src/NugetREADME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Octokit

This is a .NET SDK for GitHub's REST API, built on [Kiota](https://github.com/microsoft/kiota). For usage instructions and further documentation, please see the [project's README](https://github.com/octokit/dotnet-sdk/blob/main/README.md).
17 changes: 16 additions & 1 deletion src/GitHub.Octokit.csproj → src/Octokit.NET.SDK.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Octokit.NET.SDK</PackageId>
<Version>0.0.1-alpha</Version>
<Title>Octokit</Title>
<Description>
This is an auto-generated SDK for GitHub's REST API, built on Kiota.
</Description>
<Authors>GitHub</Authors>
<PackageTags>GitHub API Octokit dotnet-core</PackageTags>
<RepositoryUrl>https://github.com/octokit/dotnet-sdk</RepositoryUrl>
<PackageProjectUrl>https://github.com/octokit/dotnet-sdk</PackageProjectUrl>
<PackageIcon>octokit.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>NugetREADME.md</PackageReadmeFile>
<Copyright>Copyright (c) GitHub 2023</Copyright>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,5 +28,7 @@
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.1.1" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.1.1" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.1.2" />
<None Include="NugetREADME.md" Pack="true" PackagePath="\"/>
<None Include="octokit.png" Pack="true" PackagePath="\"/>
</ItemGroup>
</Project>
Binary file added src/octokit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading