From c1e3b0bbbc4f1f0f50205e29cc0305009465950d Mon Sep 17 00:00:00 2001 From: luancurti Date: Thu, 26 Jan 2023 22:30:11 -0300 Subject: [PATCH] chore(actions): configure publish --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ package.json | 10 ++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..59b1148 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + name: Publish + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: 'https://registry.npmjs.org/' + - name: Install + run: yarn install + # Publish to npm + - name: Publish + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + # Setup .npmrc file to publish to GitHub Packages + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: 'https://npm.pkg.github.com' + scope: '@platformbuilders' + # Publish to GitHub Packages + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 9893787..a290f75 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,13 @@ { - "name": "eslint-config-builders", + "name": "@platformbuilders/eslint-config-builders", "version": "0.1.0", "description": "Builders eslint config", "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, + "files": [ + "package.json", + "index.js", + "README.md" + ], "dependencies": { "@babel/core": "^7.20.12", "@typescript-eslint/eslint-plugin": "^5.48.1",