Skip to content

Commit 044d46e

Browse files
authored
Merge pull request batoulapps#104 from batoulapps/update-workflows
Update workflows
2 parents 92a8bcf + cf86468 commit 044d46e

File tree

8 files changed

+121
-128
lines changed

8 files changed

+121
-128
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# You may wish to alter this file to override the set of languages analyzed,
55
# or to provide custom queries or build logic.
6-
name: "CodeQL"
6+
name: 'CodeQL'
77

88
on:
99
push:
@@ -12,7 +12,7 @@ on:
1212
# The branches below must be a subset of the branches above
1313
branches: [master]
1414
schedule:
15-
- cron: "0 5 * * 2"
15+
- cron: '0 5 * * 2'
1616

1717
jobs:
1818
analyze:
@@ -24,17 +24,17 @@ jobs:
2424
matrix:
2525
# Override automatic language detection by changing the below list
2626
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
27-
language: ["javascript"]
27+
language: ['javascript']
2828
# Learn more...
2929
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v2
33+
uses: actions/checkout@v3
3434

3535
# Initializes the CodeQL tools for scanning.
3636
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v1
37+
uses: github/codeql-action/init@v2
3838
with:
3939
languages: ${{ matrix.language }}
4040
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -45,7 +45,7 @@ jobs:
4545
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4646
# If this step fails, then you should remove it and run the build manually (see below)
4747
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
48+
uses: github/codeql-action/autobuild@v2
4949

5050
# ℹ️ Command-line programs to run using the OS shell.
5151
# 📚 https://git.io/JvXDl
@@ -59,4 +59,4 @@ jobs:
5959
# make release
6060

6161
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
62+
uses: github/codeql-action/analyze@v2

.github/workflows/node.js.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
'on':
3+
push:
4+
branches:
5+
- master
6+
- next
7+
- beta
8+
- '*.x'
9+
jobs:
10+
release:
11+
name: release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
cache: npm
18+
node-version: 16
19+
- run: npm ci
20+
- run: npx semantic-release
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/stale.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ name: Mark stale issues and pull requests
22

33
on:
44
schedule:
5-
- cron: "30 1 * * *"
5+
- cron: '30 1 * * *'
66

77
jobs:
88
stale:
9-
109
runs-on: ubuntu-latest
11-
1210
steps:
13-
- uses: actions/stale@v1
14-
with:
15-
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
stale-issue-message: 'Stale issue message'
17-
stale-pr-message: 'Stale pull request message'
18-
stale-issue-label: 'no-issue-activity'
19-
stale-pr-label: 'no-pr-activity'
11+
- uses: actions/stale@v4
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
stale-issue-label: 'no-issue-activity'
15+
stale-pr-label: 'no-pr-activity'

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test
2+
'on':
3+
push:
4+
branches:
5+
- master
6+
- renovate/**
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
jobs:
12+
test_matrix:
13+
strategy:
14+
matrix:
15+
node-version: [12, 14, 16, 17]
16+
os:
17+
- ubuntu-latest
18+
runs-on: '${{ matrix.os }}'
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: 'Use Node.js ${{ matrix.node-version }}'
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '${{ matrix.node-version }}'
25+
cache: npm
26+
- run: npm ci
27+
- run: npm run test
28+
coverage:
29+
runs-on: ubuntu-latest
30+
needs: test_matrix
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
36+
cache: npm
37+
- run: npm ci
38+
- run: npm run lint
39+
- run: npm run test
40+
- name: Upload coverage to Codecov
41+
uses: codecov/codecov-action@v2
42+
with:
43+
directory: ./coverage
44+
build:
45+
runs-on: ubuntu-latest
46+
needs: test_matrix
47+
steps:
48+
- uses: actions/checkout@v3
49+
- uses: actions/setup-node@v3
50+
with:
51+
node-version: 16
52+
cache: npm
53+
- run: npm ci
54+
- run: npm run build

.releaserc.json

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
{
2-
"branches": [ "master", "next", "next-major", "build",
2+
"branches": [
3+
"master",
4+
"next",
5+
"next-major",
6+
"build",
37
{
4-
"name": "beta",
8+
"name": "beta",
59
"prerelease": true
6-
},
10+
},
711
{
8-
"name": "alpha",
12+
"name": "alpha",
913
"prerelease": true
1014
}
1115
],
1216
"plugins": [
1317
"@semantic-release/commit-analyzer",
1418
"@semantic-release/release-notes-generator",
1519
"@semantic-release/changelog",
16-
"@semantic-release/github",
17-
"@semantic-release/npm",
18-
"@semantic-release/git"
20+
[
21+
"@semantic-release/npm",
22+
{
23+
"tarballDir": "dist"
24+
}
25+
],
26+
"@semantic-release/git",
27+
[
28+
"@semantic-release/github",
29+
{
30+
"assets": "dist/*.tgz"
31+
}
1932
]
20-
}
33+
]
34+
}

package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "adhan",
3-
"version": "4.3.2",
43
"description": "High precision Islamic prayer time library",
4+
"version": "4.3.2",
5+
"author": "Ameir Al-Zoubi <[email protected]>",
6+
"license": "MIT",
57
"main": "lib/cjs/Adhan.js",
68
"module": "lib/esm/Adhan.js",
79
"types": "lib/types/Adhan.d.ts",
@@ -40,8 +42,6 @@
4042
"salaat",
4143
"namaz"
4244
],
43-
"author": "Ameir Al-Zoubi <[email protected]>",
44-
"license": "MIT",
4545
"devDependencies": {
4646
"@babel/cli": "^7.17.6",
4747
"@babel/core": "^7.17.9",
@@ -52,7 +52,10 @@
5252
"@rollup/plugin-babel": "^5.3.1",
5353
"@rollup/plugin-node-resolve": "^13.2.1",
5454
"@semantic-release/changelog": "^6.0.1",
55+
"@semantic-release/commit-analyzer": "^9.0.2",
5556
"@semantic-release/git": "^10.0.1",
57+
"@semantic-release/github": "^8.0.4",
58+
"@semantic-release/release-notes-generator": "^10.0.3",
5659
"@tsconfig/node12": "^1.0.9",
5760
"@types/jest": "^27.4.1",
5861
"@typescript-eslint/eslint-plugin": "^5.20.0",

0 commit comments

Comments
 (0)