Commit 7684db83 authored by Asmaa Hassan's avatar Asmaa Hassan Committed by Nick Gaskill

Add an example for publishing a package using a Windows runner

parent 0325de0c
...@@ -131,6 +131,18 @@ download: ...@@ -131,6 +131,18 @@ download:
- 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/file.txt' - 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/file.txt'
``` ```
When using a Windows runner with PowerShell, you must use `Invoke-WebRequest` or `Invoke-RestMethod`
instead of `curl` in the `upload` and `download` stages.
For example:
```yaml
upload:
stage: upload
script:
- Invoke-RestMethod -Headers @{ "JOB-TOKEN"="$CI_JOB_TOKEN" } -InFile path/to/file.txt -uri "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/file.txt" -Method put
```
### Enable or disable generic packages in the Package Registry ### Enable or disable generic packages in the Package Registry
Support for generic packages is under development but ready for production use. Support for generic packages is under development but ready for production use.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment