mirror of
https://github.com/DuendeSoftware/products
synced 2026-05-24 09:28:24 +00:00
Fix duplicate package error for templates and remove obsolete template pipelines (#1886)
* obsolte templates * cleanup build project * suppress duplicate warning
This commit is contained in:
parent
aea6005116
commit
5aa124dbad
6 changed files with 14 additions and 207 deletions
102
.github/workflows/bff-templates-release.yml
vendored
102
.github/workflows/bff-templates-release.yml
vendored
|
|
@ -1,102 +0,0 @@
|
|||
# This was generated by tool. Edits will be overwritten.
|
||||
|
||||
name: bff/templates/release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version in format X.Y.Z or X.Y.Z-preview.'
|
||||
type: string
|
||||
required: true
|
||||
default: '0.0.0'
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
jobs:
|
||||
tag:
|
||||
name: Tag and Pack
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: bff
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Dotnet
|
||||
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
|
||||
with:
|
||||
dotnet-version: |-
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Checkout target branch
|
||||
if: github.event.inputs.branch != 'main'
|
||||
run: git checkout ${{ github.event.inputs.branch }}
|
||||
- name: Git Config
|
||||
run: |-
|
||||
git config --global user.email "github-bot@duendesoftware.com"
|
||||
git config --global user.name "Duende Software GitHub Bot"
|
||||
- name: Git Config
|
||||
if: github.event.inputs['remove-tag-if-exists'] == 'true'
|
||||
run: |-
|
||||
if git rev-parse bff-${{ github.event.inputs.version }} >/dev/null 2>&1; then
|
||||
git tag -d bff-${{ github.event.inputs.version }}
|
||||
git push --delete origin bff-${{ github.event.inputs.version }}
|
||||
else
|
||||
echo 'Tag bff-${{ github.event.inputs.version }} does not exist.'
|
||||
fi
|
||||
- name: Git Config
|
||||
run: |-
|
||||
git tag -a bff-${{ github.event.inputs.version }} -m ""Release v${{ github.event.inputs.version }}""
|
||||
git push origin bff-${{ github.event.inputs.version }}
|
||||
- name: Pack templates/templates.bff.csproj
|
||||
run: dotnet pack -c Release templates/templates.bff.csproj -o artifacts
|
||||
- name: Tool restore
|
||||
run: dotnet tool restore
|
||||
- name: Sign packages
|
||||
run: |-
|
||||
for file in artifacts/*.nupkg; do
|
||||
dotnet NuGetKeyVaultSignTool sign "$file" --file-digest sha256 --timestamp-rfc3161 http://timestamp.digicert.com --azure-key-vault-url https://duendecodesigninghsm.vault.azure.net/ --azure-key-vault-client-id 18e3de68-2556-4345-8076-a46fad79e474 --azure-key-vault-tenant-id ed3089f0-5401-4758-90eb-066124e2d907 --azure-key-vault-client-secret ${{ secrets.SignClientSecret }} --azure-key-vault-certificate NuGetPackageSigning
|
||||
done
|
||||
- name: Push packages to GitHub
|
||||
run: dotnet nuget push artifacts/*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
|
||||
with:
|
||||
name: artifacts
|
||||
path: bff/artifacts/*.nupkg
|
||||
overwrite: true
|
||||
retention-days: 15
|
||||
publish:
|
||||
name: Publish to nuget.org
|
||||
needs:
|
||||
- tag
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: nuget.org
|
||||
steps:
|
||||
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||
with:
|
||||
name: artifacts
|
||||
path: artifacts
|
||||
- name: Setup Dotnet
|
||||
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
|
||||
with:
|
||||
dotnet-version: |-
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: List files
|
||||
run: tree
|
||||
shell: bash
|
||||
- name: Push packages to nuget.org
|
||||
run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_API_KEY }} --skip-duplicate
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
# This was generated by tool. Edits will be overwritten.
|
||||
|
||||
name: identity-server/templates/release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version in format X.Y.Z or X.Y.Z-preview.'
|
||||
type: string
|
||||
required: true
|
||||
default: '0.0.0'
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
jobs:
|
||||
tag:
|
||||
name: Tag and Pack
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: identity-server
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Dotnet
|
||||
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
|
||||
with:
|
||||
dotnet-version: |-
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Checkout target branch
|
||||
if: github.event.inputs.branch != 'main'
|
||||
run: git checkout ${{ github.event.inputs.branch }}
|
||||
- name: Git Config
|
||||
run: |-
|
||||
git config --global user.email "github-bot@duendesoftware.com"
|
||||
git config --global user.name "Duende Software GitHub Bot"
|
||||
- name: Git Config
|
||||
if: github.event.inputs['remove-tag-if-exists'] == 'true'
|
||||
run: |-
|
||||
if git rev-parse is-${{ github.event.inputs.version }} >/dev/null 2>&1; then
|
||||
git tag -d is-${{ github.event.inputs.version }}
|
||||
git push --delete origin is-${{ github.event.inputs.version }}
|
||||
else
|
||||
echo 'Tag is-${{ github.event.inputs.version }} does not exist.'
|
||||
fi
|
||||
- name: Git Config
|
||||
run: |-
|
||||
git tag -a is-${{ github.event.inputs.version }} -m ""Release v${{ github.event.inputs.version }}""
|
||||
git push origin is-${{ github.event.inputs.version }}
|
||||
- name: Pack templates/templates.identity-server.csproj
|
||||
run: dotnet pack -c Release templates/templates.identity-server.csproj -o artifacts
|
||||
- name: Tool restore
|
||||
run: dotnet tool restore
|
||||
- name: Sign packages
|
||||
run: |-
|
||||
for file in artifacts/*.nupkg; do
|
||||
dotnet NuGetKeyVaultSignTool sign "$file" --file-digest sha256 --timestamp-rfc3161 http://timestamp.digicert.com --azure-key-vault-url https://duendecodesigninghsm.vault.azure.net/ --azure-key-vault-client-id 18e3de68-2556-4345-8076-a46fad79e474 --azure-key-vault-tenant-id ed3089f0-5401-4758-90eb-066124e2d907 --azure-key-vault-client-secret ${{ secrets.SignClientSecret }} --azure-key-vault-certificate NuGetPackageSigning
|
||||
done
|
||||
- name: Push packages to GitHub
|
||||
run: dotnet nuget push artifacts/*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
|
||||
with:
|
||||
name: artifacts
|
||||
path: identity-server/artifacts/*.nupkg
|
||||
overwrite: true
|
||||
retention-days: 15
|
||||
publish:
|
||||
name: Publish to nuget.org
|
||||
needs:
|
||||
- tag
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: nuget.org
|
||||
steps:
|
||||
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||
with:
|
||||
name: artifacts
|
||||
path: artifacts
|
||||
- name: Setup Dotnet
|
||||
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
|
||||
with:
|
||||
dotnet-version: |-
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: List files
|
||||
run: tree
|
||||
shell: bash
|
||||
- name: Push packages to nuget.org
|
||||
run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_API_KEY }} --skip-duplicate
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<PackageType>Template</PackageType>
|
||||
|
||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
||||
<PackageVersion>1.0</PackageVersion>
|
||||
<IncludeContentInPack>true</IncludeContentInPack>
|
||||
|
|
@ -18,6 +17,9 @@
|
|||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
|
||||
<!--NU5128 doesn't apply to template packages.
|
||||
https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-template-package#description-of-the-project-xml-->
|
||||
<NoWarn>$(NoWarn);NU5128</NoWarn>
|
||||
|
||||
<!--Minver-->
|
||||
<BUILD_NUMBER Condition="'$(BUILD_NUMBER)' == ''">0</BUILD_NUMBER>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
# Duende.Templates.BFF
|
||||
.NET CLI Templates for Duende BFF
|
||||
|
||||
## Building
|
||||
|
||||
``` pwsh
|
||||
cd templates
|
||||
dotnet run -p build
|
||||
|
||||
dotnet pack ..\artifacts\ -o d:\packages
|
||||
|
||||
```
|
||||
|
||||
### dotnet new duende-bff-remoteapi
|
||||
Creates a basic JavaScript-based BFF host that configures and invokes a remote API via the BFF proxy.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ foreach (var path in paths.Select(Path.GetFullPath))
|
|||
|
||||
Console.WriteLine($"Copied template files to {artifactsDir}");
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("dotnet pack -c Release {artifactsDir} -o ");
|
||||
Console.WriteLine($"dotnet pack -c Release {artifactsDir}");
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="src\**\*" Exclude="src\**\bin\**;src\**\obj\**" />
|
||||
<Content Include="src\**\*" Exclude="src\**\bin\**;src\**\obj\**;" PackagePath="src" />
|
||||
<Compile Remove="**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue