Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/innerspacetrainings/azure-npm-publish
GitHub action to publish an npm package into Azure Artifact
https://github.com/innerspacetrainings/azure-npm-publish
Last synced: 3 months ago
JSON representation
GitHub action to publish an npm package into Azure Artifact
- Host: GitHub
- URL: https://github.com/innerspacetrainings/azure-npm-publish
- Owner: innerspacetrainings
- License: mit
- Created: 2020-09-18T13:21:10.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T14:48:29.000Z (about 4 years ago)
- Last Synced: 2024-07-12T13:50:47.586Z (4 months ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure NPM Publish
GitHub action to automatically publish a NPM package into Azure Artifacts
## Setup
Create the file `.github/workflows/azure-npm-publish.yml` with the following content:
```yaml
name: Azure Publishon:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: innerspacetrainings/azure-npm-publish@master
with:
package-dir: 'Custom/directory'
npm-email: '[email protected]'
organization: 'organization/url'
feed: 'feed-name'
username: 'anything-for-the-logs'
base64-token: ${{ secrets.AZURE_TOKEN }}
```### Configuration
For reference, I do recommend you to know how to set up the .npmrc file following [Microsoft's documentation](https://docs.microsoft.com/en-us/azure/devops/artifacts/get-started-npm?view=azure-devops&tabs=windows#set-up-your-npmrc-files).
The fields here the following:
| Field | Required | Description |
| -------------- |:--------:| :------------------------------------------------------------------------------- |
| `package-dir` | false | The path for the `package.json` if it is not in root |
| `npm-email` | true | Required email to upload the npm package |
| `organization` | true | Value which replaces `` in the .npmrc file |
| `feed` | true | Value which replaces `` in the .npmrc file |
| `username` | true | Any value but not an empty string |
| `base64-token` | true | Value which replaces `[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]` in the .npmrc file |