diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 0000000..8f79d5d --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,33 @@ +name: Anyline User Guidance + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 'lts/iron' + - run: yarn install --frozen-lockfile + - run: yarn jest + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 'lts/iron' + registry-url: https://npm.pkg.github.com/ + - run: yarn install --frozen-lockfile + - run: yarn npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..e026668 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@anyline:registry=https://npm.pkg.github.com diff --git a/package.json b/package.json index 3c26bc6..a2d85d9 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "type": "module", "license": "MIT", "publishConfig": { - "registry":"https://npm.pkg.github.com/" + "@anyline:registry":"https://npm.pkg.github.com/" }, "repository": { "type": "git",