onjs 2.3.0 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,19 +6,24 @@ on:
6
6
  branches:
7
7
  - master
8
8
  pull_request:
9
+ branches:
10
+ - '**'
9
11
  release:
10
12
  types: [published]
11
13
 
12
14
  permissions:
13
15
  contents: read
14
16
  pull-requests: read
17
+ id-token: write
15
18
 
16
19
  concurrency:
17
20
  group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
18
21
  cancel-in-progress: true
19
22
 
20
23
  jobs:
21
- test-and-build:
24
+ test:
25
+ # This job runs on pull requests and push to master branch
26
+ if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
22
27
  runs-on: ubuntu-latest
23
28
  container: node:16-bullseye
24
29
  services:
@@ -44,20 +49,47 @@ jobs:
44
49
  steps:
45
50
  - run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
46
51
  - name: Check out repository code
47
- uses: actions/checkout@v3
52
+ uses: actions/checkout@v4
53
+
48
54
  - run: echo "The ${{ github.repository }} repository has been cloned to the runner."
49
55
  - run: echo "The workflow is now ready to test your code on the runner."
56
+
57
+ # Setup .npmrc file to publish to npm
58
+ - uses: actions/setup-node@v4
59
+ with:
60
+ node-version: '20.x'
61
+ registry-url: 'https://registry.npmjs.org'
62
+
50
63
  - name: Installing dependencies
51
- run: npm install
64
+ run: npm ci
52
65
 
53
66
  - name: Testing
54
67
  run: npm test
68
+
55
69
  - run: echo "Job's status is ${{ job.status }}."
56
- - uses: actions/setup-node@v3
70
+
71
+ build-and-publish:
72
+ # This job runs on push to master branch
73
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
74
+ runs-on: ubuntu-latest
75
+
76
+ steps:
77
+ - run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
78
+ - name: Check out repository code
79
+ uses: actions/checkout@v4
80
+
81
+ - run: echo "The ${{ github.repository }} repository has been cloned to the runner."
82
+ - run: echo "The workflow is now ready to build your code on the runner."
83
+
84
+ # Setup .npmrc file to publish to npm
85
+ - uses: actions/setup-node@v4
57
86
  with:
58
- node-version: '16.x'
87
+ node-version: '20.x'
59
88
  registry-url: 'https://registry.npmjs.org'
89
+
90
+ - run: echo "Job's status is ${{ job.status }}."
91
+
60
92
  - name: Publishing to NPM
61
- run: npm publish
93
+ run: npm publish --provenance --access public
62
94
  env:
63
95
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onjs",
3
- "version": "2.3.0",
3
+ "version": "2.3.3",
4
4
  "description": "On.js is an event library based on RabbitMQ that helps you control events on a microservices arquitecture",
5
5
  "main": "index.js",
6
6
  "scripts": {