Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automate deploy to npm via gh-actions #2

Open
KyleMit opened this issue Jul 27, 2020 · 2 comments
Open

automate deploy to npm via gh-actions #2

KyleMit opened this issue Jul 27, 2020 · 2 comments
Projects

Comments

@KyleMit
Copy link
Member

KyleMit commented Jul 27, 2020

Learning GH Actions

Example

Automatically Publish to npm using GitHub Actions

name: Publish

on:
  release:
    types: [published]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://registry.npmjs.org/
      - run: yarn install
      - run: npm publish --access public
        env:
          NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@KyleMit
Copy link
Member Author

KyleMit commented Jul 27, 2020

May be some difficulty creating org token, but we could probably created an "org user" that has access to the org and use their token,.

Possible to add to repo secrets or org secrets but maybe prefer org for future use cases

@KyleMit KyleMit added this to To do in Issues Aug 3, 2020
@KyleMit
Copy link
Member Author

KyleMit commented Aug 3, 2020

Updates this morning with @jmathias3

  1. Created ads-vdh-user account
  2. Invited user acct to ads-vdh org with member permissions
  3. Created token scoped to repos that the user has access to
  4. Added token to github org secrets under NPM_AUTH_TOKEN and provided access to sql-cli and covid-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issues
  
To do
Development

No branches or pull requests

1 participant