diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c1b229d..d5a3d25 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,3 +22,24 @@ jobs: - run: npm whoami; npm --ignore-scripts publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-github: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://npm.pkg.github.com + cache: npm + - run: npm ci + - run: npm test + - run: npm version ${TAG_NAME} --git-tag-version=false + env: + TAG_NAME: ${{ github.event.release.tag_name }} + - run: npm whoami; npm --ignore-scripts publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index b7962b4..b71ecaa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@github/prettier-config", - "version": "0.0.4", + "version": "0.0.0-development", "description": "Prettier config used at GitHub", "repository": "github/prettier-config", "keywords": [ @@ -14,8 +14,7 @@ "main": "index.js", "scripts": { "test:update": "prettier --config ./index.js --write examples/", - "test": "prettier --config ./index.js --check examples/", - "postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'" + "test": "prettier --config ./index.js --check examples/" }, "devDependencies": { "prettier": "^2.8.0"