mirror of https://github.com/actions/toolkit
44 lines
919 B
YAML
44 lines
919 B
YAML
name: Publish NPM
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
package:
|
|
required: true
|
|
description: 'core, artifact, cache, exec, github, glob, io, tool-cache'
|
|
version:
|
|
required: true
|
|
description: 'the version of the package to publish'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Setup repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: npm install
|
|
run: npm install
|
|
|
|
- name: bootstrap
|
|
run: npm run bootstrap
|
|
|
|
- name: build
|
|
run: npm run build
|
|
|
|
- name: Run tests
|
|
run: npm run test
|
|
|
|
- name: echo inputs
|
|
run: echo ${{ github.event.inputs.package }} ${{ github.event.inputs.version }}
|
|
|
|
publish:
|
|
runs-on: macos-latest
|
|
needs: test
|
|
environment: npm-publish
|
|
steps:
|
|
- name: Testing
|
|
run: echo 'this is where we publish'
|
|
|