-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
32 lines (30 loc) · 1.6 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions
name: "bevry-actions/npm"
author: "Benjamin Arthur Lupton <[email protected]>"
description: "GitHub Action to publish your project to npm"
branding:
icon: "package"
color: "red"
# https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#inputs
inputs:
npmAuthToken:
description: "Specify the token to authorize the publishing of releases to npm."
required: true
npmBranchTag:
description: "If you wish for each new commit to particular branch to be published to a particular npm tag, then specify it like so `branch:tag`, e.g. `main:next`. Omitting the branch like so `:next` will use the default branch. Using `master` as the branch will use the master branch as reported by GitHub. Using `default` as the branch will use the default branch as reported by GitHub."
required: false
bevryCDNToken:
description: "If you wish to map your npm release to the Bevry CDN, then provide your Bevry CDN token."
required: false
# https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-run-steps-actions
runs:
using: "composite"
steps:
- run: $GITHUB_ACTION_PATH/action.bash
shell: bash
env:
GH_MASTER_BRANCH: ${{ github.event.repository.master_branch }}
GH_EVENT_NAME: ${{ github.event_name }}
NPM_AUTH_TOKEN: ${{ inputs.npmAuthToken }}
NPM_BRANCH_TAG: ${{ inputs.npmBranchTag }}
BEVRY_CDN_TOKEN: ${{ inputs.bevryCDNToken }}