diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index df18697..70de378 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,10 +20,16 @@ jobs: uses: actions/setup-node@v3 with: node-version: '16.x' - registry-url: 'https://registry.npmjs.org/' + registry-url: 'https://npm.pkg.github.com' scope: '@fullstack-devops' - name: install packages run: yarn - name: build applikation run: yarn run build + + - name: npm publish to GitHub + working-directory: dist/ng-mat-components + run: yarn publish --access public --new-version ${{ needs.generate_infos.outputs.version }} --no-git-tag-version + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bcfbd6..f744c1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Setup node for GitHub + - name: Setup node for npmjs uses: actions/setup-node@v3 with: node-version: '16.x' @@ -35,16 +35,22 @@ jobs: - name: build applikation run: yarn run build - - name: yarn publish + - name: yarn publish to npmjs working-directory: dist/ng-mat-components run: yarn publish --access public --new-version ${{ needs.create_release.outputs.version }} --no-git-tag-version env: NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }} - publish_gh_release: - runs-on: ubuntu-latest - needs: build - steps: + - name: Setup node for GitHub + uses: actions/setup-node@v3 + with: + registry-url: 'https://npm.pkg.github.com' + - name: yarn publish to GitHub + working-directory: dist/ng-mat-components + run: yarn publish --access public --new-version ${{ needs.create_release.outputs.version }} --no-git-tag-version + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish release run: awesome-ci release publish --release-id "${{ needs.create_release.outputs.release-id }}" env: diff --git a/projects/ng-mat-components/package.json b/projects/ng-mat-components/package.json index 22a3784..99821d4 100644 --- a/projects/ng-mat-components/package.json +++ b/projects/ng-mat-components/package.json @@ -2,9 +2,6 @@ "name": "@fullstack-devops/ng-mat-components", "version": "0.0.0-PLACEHOLDER", "license": "Apache-2.0", - "publishConfig": { - "@fullstack-devops:registry": "https://registry.npmjs.org/" - }, "peerDependencies": { "@angular/common": "^13.0.0", "@angular/core": "^13.0.0",