Skip to content
This repository was archived by the owner on Jun 4, 2023. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: `./node_modules/@jgierer12/js-configs/eslint`
extends: `./node_modules/@jgierer12/js-configs/eslint`,
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
name: CI

on: [push]
on:
pull_request:
push:
branches: [master]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: jgierer12/npm-auth-gpr@dist
- name: Self test
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: npm install
- run: npm ci
- run: npm run lint
- run: npm run posttest
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ inputs:
required: true
runs:
using: node12
main: index.js
main: dist/index.js
9 changes: 9 additions & 0 deletions dist/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@actions/core
MIT
Copyright 2019 GitHub

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions dist/index.js

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

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { promisify } = require(`util`);
const exec = promisify(require(`child_process`).exec);
const appendFile = promisify(require(`fs`).appendFile);
const core = require(`@actions/core`);

const run = async () => {
const token = core.getInput(`token`);

try {
await exec(`echo "//npm.pkg.github.com/:_authToken=${token}" >> .npmrc`);
await appendFile(`.npmrc`, `//npm.pkg.github.com/:_authToken=${token}`);
} catch (error) {
core.setFailed(error.message);
}
Expand Down
Loading