Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

[WIP] Make it work in Actions v2 #20

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions action.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const core = require('@actions/core')
const publish = require('./src/publish')

process.env.NPM_AUTH_TOKEN = core.getInput('npm-auth-token', {required: true})

publish({npmArgs: ['--unsafe-perm']})
.then(context => {
core.debug(`published: ${JSON.stringify(context)}`)
})
.catch(error => {
core.error(error)
core.setFailed(error.message)
})
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Primer Publish
description: Action to publish with npm with Primer version conventinos
author: GitHub
inputs:
npm-auth-token:
description: 'your npm access token'
required: true
runs:
using: node12
main: action.js
114 changes: 114 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"test": "jest"
},
"dependencies": {
"@actions/core": "^1.0.0",
"@actions/github": "^1.0.1",
"@octokit/rest": "^16.15.0",
"action-status": "^0.1.1",
"github-action-meta": "^0.1.2",
Expand Down