Skip to content

Commit 20f45b9

Browse files
authored
Bugfix/test publish on pr (#27)
1 parent f79b178 commit 20f45b9

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/workflows/pull-request.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ jobs:
2020
uses: actions/setup-node@v3
2121
with:
2222
node-version: '16.x'
23-
registry-url: 'https://registry.npmjs.org/'
23+
registry-url: 'https://npm.pkg.github.com'
2424
scope: '@fullstack-devops'
2525

2626
- name: install packages
2727
run: yarn
2828
- name: build applikation
2929
run: yarn run build
30+
31+
- name: npm publish to GitHub
32+
working-directory: dist/ng-mat-components
33+
run: yarn publish --access public --new-version ${{ needs.generate_infos.outputs.version }} --no-git-tag-version
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Checkout code
2424
uses: actions/checkout@v3
2525

26-
- name: Setup node for GitHub
26+
- name: Setup node for npmjs
2727
uses: actions/setup-node@v3
2828
with:
2929
node-version: '16.x'
@@ -35,16 +35,22 @@ jobs:
3535
- name: build applikation
3636
run: yarn run build
3737

38-
- name: yarn publish
38+
- name: yarn publish to npmjs
3939
working-directory: dist/ng-mat-components
4040
run: yarn publish --access public --new-version ${{ needs.create_release.outputs.version }} --no-git-tag-version
4141
env:
4242
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
4343

44-
publish_gh_release:
45-
runs-on: ubuntu-latest
46-
needs: build
47-
steps:
44+
- name: Setup node for GitHub
45+
uses: actions/setup-node@v3
46+
with:
47+
registry-url: 'https://npm.pkg.github.com'
48+
- name: yarn publish to GitHub
49+
working-directory: dist/ng-mat-components
50+
run: yarn publish --access public --new-version ${{ needs.create_release.outputs.version }} --no-git-tag-version
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
4854
- name: Publish release
4955
run: awesome-ci release publish --release-id "${{ needs.create_release.outputs.release-id }}"
5056
env:

projects/ng-mat-components/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
"name": "@fullstack-devops/ng-mat-components",
33
"version": "0.0.0-PLACEHOLDER",
44
"license": "Apache-2.0",
5-
"publishConfig": {
6-
"@fullstack-devops:registry": "https://registry.npmjs.org/"
7-
},
85
"peerDependencies": {
96
"@angular/common": "^13.0.0",
107
"@angular/core": "^13.0.0",

0 commit comments

Comments
 (0)