Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
build: configure release
Browse files Browse the repository at this point in the history
  • Loading branch information
dariuszkuc committed Oct 10, 2023
1 parent eff49e8 commit e1bf806
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 325 deletions.
17 changes: 17 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name-template: v$NEXT_PATCH_VERSION
tag-template: v$NEXT_PATCH_VERSION
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
categories:
- title: Major Changes
label: "change: major"

- title: Minor Changes
label: "change: minor"

- title: Patch Changes
label: "change: patch"

- title: Other Changes

template: |
$CHANGES
22 changes: 11 additions & 11 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
needs: build
uses: ./.github/workflows/compatibility.yaml

# release-notes:
# timeout-minutes: 10
# runs-on: ubuntu-latest
# permissions:
# contents: write
# pull-requests: read
# steps:
# - name: Release Drafter
# uses: release-drafter/release-drafter@v5
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-notes:
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Release Drafter
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
release:
types: [ published ]

jobs:
release-code:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.repository == 'apollographql/federation-hotchocolate'

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Create package
run: |
NEW_VERSION=$(echo "${GITHUB_REF}" | sed 's/.*\/v//')
echo "New version: ${NEW_VERSION}"
dotnet pack -p:Version=${NEW_VERSION} -p:Configuration=Release src/Federation/ApolloGraphQL.Federation.HotChocolate.csproj
- name: Publish package
run: dotnet nuget push src/Federation/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;NU5104</NoWarn>
<PackRelease>true</PackRelease>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Continuous Integration](https://github.com/apollographql/federation-hotchocolate/workflows/Continuous%20Integration/badge.svg)](https://github.com/apollographql/federation-hotchocolate/actions?query=workflow%3A%22Continuous+Integration%22)
[![MIT License](https://img.shields.io/github/license/apollographql/federation-hotchoclate.svg)](LICENSE)
[![MIT License](https://img.shields.io/github/license/apollographql/federation-hotchocolate.svg)](LICENSE)
[![Nuget](https://img.shields.io/nuget/v/ApolloGraphQL.Federation.HotChocolate)](https://www.nuget.org/packages/ApolloGraphQL.Federation.HotChocolate/)
[![Join the community forum](https://img.shields.io/badge/join%20the%20community-forum-blueviolet)](https://community.apollographql.com)
[![Join our Discord server](https://img.shields.io/discord/1022972389463687228.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square)](https://discord.gg/graphos)
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.401",
"rollForward": "minor"
"version": "6.0.415",
"rollForward": "latestMajor"
}
}
3 changes: 1 addition & 2 deletions src/Federation/ApolloGraphQL.Federation.HotChocolate.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>ApolloGraphQL.Federation.HotChocolate</RootNamespace>
<PackageId>ApolloGraphQL.Federation.HotChocolate</PackageId>
<AssemblyName>ApolloGraphQL.Federation.HotChocolate</AssemblyName>
Expand Down Expand Up @@ -34,6 +33,6 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>FederationResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="README.md" Pack="true" PackagePath="\"/>
<None Include="$(MSBuildThisFileDirectory)..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
</Project>
Loading

0 comments on commit e1bf806

Please sign in to comment.