Skip to content

Commit e442efc

Browse files
authored
SPARK-98 Expose v6 Icons in a new Internal Legacy Package (#478)
* push to cloudsmith * use different args * skip duplicate * add option to ignore npm errors * fix yaml * lint * try string type * test * lint * also update the assembly name * update root namespace
1 parent c44f26f commit e442efc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/packages.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
tags:
66
- "v*" # only run when a new package version is tagged
77
workflow_dispatch:
8+
inputs:
9+
ignoreNpmErrors:
10+
description: "Whether to continue the workflow if the npm package publish fails or not. Useful when the npm package already exists."
11+
required: false
12+
default: "false"
813

914
jobs:
1015
build-ubuntu:
@@ -28,6 +33,7 @@ jobs:
2833
run: npm ci
2934

3035
- name: Build and push package to npm
36+
continue-on-error: ${{ inputs.ignoreNpmErrors == 'true' }}
3137
env:
3238
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
3339
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
@@ -42,4 +48,10 @@ jobs:
4248
run: npm run pack:nuget
4349

4450
- name: Push package to nuget
45-
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}}
51+
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
52+
53+
- name: Build renamed package for Cloudsmith
54+
run: dotnet pack -c Release ./dotnet/src/StackExchange.StacksIcons.csproj /p:PackageId=StackExchange.StacksIcons.Legacy /p:AssemblyName=StackExchange.StacksIcons.Legacy /p:RootNamespace=StackExchange.StacksIcons.Legacy
55+
56+
- name: Push package to Cloudsmith
57+
run: dotnet nuget push **\StackExchange.StacksIcons.Legacy.*.nupkg --source https://nuget.stackoverflow.software/v3/index.json --api-key ${{secrets.CLOUDSMITH_API_KEY}} --skip-duplicate

0 commit comments

Comments
 (0)