Skip to content

Commit

Permalink
ci: generate .npmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jun 2, 2022
1 parent bcbfdad commit 177a763
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
with:
node-version: 18

- name: Install deps
run: npm i

- name: Run tests
run: npm run test

Expand All @@ -50,6 +53,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Install deps
run: npm i

- name: Run tests
timeout-minutes: 1
run: npm run test
Expand All @@ -60,25 +66,41 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: test_push
runs-on: ubuntu-20.04

permissions:
checks: read
statuses: write
contents: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
ref: master

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install deps
run: npm i

- name: Create .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_USER: 'qiwibot'
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_EMAIL: '[email protected]'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMITTER_EMAIL: '[email protected]'
GIT_AUTHOR_NAME: '@qiwibot'
GIT_COMMITTER_NAME: '@qiwibot'
run: |
npm link
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

# Creds
.npmrc

0 comments on commit 177a763

Please sign in to comment.