Skip to content

auto-scope

Actions
Automatically adds a scope in package.json using the repo s owner username for publishing on github package repository
v1.0.1
Latest
Star (5)

action-autoscope

Automatically adds a scope in package.json using the repo's owner username for publishing on github package repository.
This is primary used for easily publish a package to the github package repository while also publishing to the npm package repository without a scope.

Example of usage:

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
      - run: yarn install
      - run: npm test

  publish-gpr:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://npm.pkg.github.com/
          scope: '<@OWNER>'
        env:
          NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
      - name: Dep install
        run: yarn install
      - name: Autoscope package
        uses: khaazz/action-autoscope@master
      - name: Configure .npmrc
        run: echo registry=https://npm.pkg.github.com/<OWNER> >> .npmrc
      - name: Publish
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

auto-scope is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Automatically adds a scope in package.json using the repo s owner username for publishing on github package repository
v1.0.1
Latest

auto-scope is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.