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

Update package versioning #89

Merged
merged 8 commits into from
Jul 25, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
submodules: true

- name: Set up .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4

- name: Format whitespace
working-directory: ${{ env.WORKING_DIR }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
options:
- Production
- Staging
version:
description: Library version
required: true
default: 1.0.0-preview.30
type: string

jobs:
publish:
Expand All @@ -27,7 +32,7 @@ jobs:
submodules: true

- name: Set up .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4

- name: Install dependencies
working-directory: ${{ env.WORKING_DIR }}
Expand All @@ -38,7 +43,7 @@ jobs:
run: |
dotnet build -c ${{ env.BUILD_CONFIG }} --no-restore \
-p:Commit=${{ github.sha }} \
-p:VersionSuffix=preview.${{ github.run_number }}
-p:Version=${{ github.event.inputs.version }}

- name: Test
working-directory: ${{ env.WORKING_DIR }}
Expand All @@ -54,7 +59,7 @@ jobs:
- name: Publish
working-directory: ${{ env.WORKING_DIR }}
env:
PACK_OPTS: -c ${{ env.BUILD_CONFIG }} --no-build -p:VersionSuffix=preview.${{ github.run_number }}
PACK_OPTS: -c ${{ env.BUILD_CONFIG }} --no-build -p:Version=${{ github.event.inputs.version }}
run: |
dotnet pack Libp2p ${{ env.PACK_OPTS }}
dotnet pack Libp2p.Core ${{ env.PACK_OPTS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
submodules: true

- name: Set up .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4

- name: Install dependencies
working-directory: ${{ env.WORKING_DIR }}
Expand Down
8 changes: 4 additions & 4 deletions src/libp2p/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

Expand All @@ -19,9 +19,9 @@
<RepositoryUrl>https://github.com/nethermindeth/dotnet-libp2p</RepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Product>Nethermind libp2p</Product>
<SourceRevisionId Condition="'$(Commit)' != ''">$(Commit.Substring(0, 8))</SourceRevisionId>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<SourceRevisionId Condition="'$(Commit)' != ''">$(Commit)</SourceRevisionId>
<!--<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>-->
</PropertyGroup>

</Project>
8 changes: 4 additions & 4 deletions src/nuget.config → src/libp2p/nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<packageSources>
flcl42 marked this conversation as resolved.
Show resolved Hide resolved
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="nugettest.org" value="https://apiint.nugettest.org/v3/index.json" />
<!--<add key="nugettest.org" value="https://apiint.nugettest.org/v3/index.json" />-->
</packageSources>
<packageSourceMapping>
<!--<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="nugettest.org">
<package pattern="*Multiformats*" />
<package pattern="" />
</packageSource>
</packageSourceMapping>
</packageSourceMapping>-->
</configuration>
Loading
Loading