You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: deployment/ci-cd-license-key.md
+24-8
Original file line number
Diff line number
Diff line change
@@ -31,32 +31,48 @@ The recommended way to provide your license key to the `Telerik.Licensing` NuGet
31
31
32
32
### Azure Pipelines
33
33
34
-
1. Create a new [user-defined variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables) named `TELERIK_LICENSE`, according to your [YAML](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-variables-in-pipeline) or [Classic](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=classic%2Cbatch#set-variables-in-pipeline) pipeline setup.
35
-
1. Paste the contents of the license key file as a value of the variable.
34
+
1. Create a new [secret variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables). Follow the respective producedure for your **YAML**, **Classic**, or **CLI** pipeline setup. Also check the separate article [Set Secret Variables](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables).
35
+
1. Paste the contents of the license key file as a value of the secret variable.
36
+
1. Map the secret variable to a new environment variable named `TELERIK_LICENSE`.
37
+
1. Use the `TELERIK_LICENSE` environment variable in the tasks, steps, or scripts that build and publish the Blazor app.
38
+
39
+
>caption Using a TELERIK_LICENSE environment variable in Azure Pipeline YAML
40
+
41
+
````YAML.skip-repl
42
+
steps:
43
+
44
+
- task: DotNetCoreCLI@2
45
+
inputs:
46
+
command: 'build'
47
+
# ...
48
+
env:
49
+
TELERIK_LICENSE: $(Secret_Telerik_License_Key)
50
+
````
36
51
37
52
> Another option is to use a Telerik license file as a [secure file in the pipeline](https://learn.microsoft.com/en-us/azure/devops/pipelines/library/secure-files). Implement a [script that copies the license file](https://learn.microsoft.com/en-us/azure/devops/pipelines/library/secure-files?view=azure-devops#consume-a-secure-file-in-a-pipeline) to the application's root folder, so that it's available to all projects that need it.
38
53
39
54
### GitHub Actions
40
55
41
56
1. Create a new [Repository Secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) or an [Organization Secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization).
42
-
1. Set the name of the secret to `TELERIK_LICENSE` and paste the contents of the license file as a value.
43
-
1. Add a `TELERIK_LICENSE` environment variable to the steps, which build and publish the Blazor app:
57
+
1. Paste the contents of the license key file as a value of the GitHub secret.
58
+
1. Assign the secret to an environment variable named `TELERIK_LICENSE`.
59
+
1. Use the `TELERIK_LICENSE` environment variable in the steps, which build and publish the Blazor app:
Also see [Using NuGet Keys](slug:deployment-nuget#using-nuget-keys) in the article [Restoring NuGet Packages in Your CI Workflow](slug:deployment-nuget). It shows how to use the `TELERIK_NUGET_KEY` environment variable in your CI build environment.
0 commit comments