Skip to content

Commit

Permalink
Merge pull request #104 from batoulapps/update-workflows
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
sgtsquiggs authored Apr 26, 2022
2 parents 92a8bcf + cf86468 commit 044d46e
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 128 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: 'CodeQL'

on:
push:
Expand All @@ -12,7 +12,7 @@ on:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: "0 5 * * 2"
- cron: '0 5 * * 2'

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

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

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

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
100 changes: 0 additions & 100 deletions .github/workflows/node.js.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
'on':
push:
branches:
- master
- next
- beta
- '*.x'
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 6 additions & 10 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"
- cron: '30 1 * * *'

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test
'on':
push:
branches:
- master
- renovate/**
pull_request:
types:
- opened
- synchronize
jobs:
test_matrix:
strategy:
matrix:
node-version: [12, 14, 16, 17]
os:
- ubuntu-latest
runs-on: '${{ matrix.os }}'
steps:
- uses: actions/checkout@v3
- name: 'Use Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v3
with:
node-version: '${{ matrix.node-version }}'
cache: npm
- run: npm ci
- run: npm run test
coverage:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: ./coverage
build:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run build
30 changes: 22 additions & 8 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
{
"branches": [ "master", "next", "next-major", "build",
"branches": [
"master",
"next",
"next-major",
"build",
{
"name": "beta",
"name": "beta",
"prerelease": true
},
},
{
"name": "alpha",
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/git"
[
"@semantic-release/npm",
{
"tarballDir": "dist"
}
],
"@semantic-release/git",
[
"@semantic-release/github",
{
"assets": "dist/*.tgz"
}
]
}
]
}
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "adhan",
"version": "4.3.2",
"description": "High precision Islamic prayer time library",
"version": "4.3.2",
"author": "Ameir Al-Zoubi <[email protected]>",
"license": "MIT",
"main": "lib/cjs/Adhan.js",
"module": "lib/esm/Adhan.js",
"types": "lib/types/Adhan.d.ts",
Expand Down Expand Up @@ -40,8 +42,6 @@
"salaat",
"namaz"
],
"author": "Ameir Al-Zoubi <[email protected]>",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.9",
Expand All @@ -52,7 +52,10 @@
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-node-resolve": "^13.2.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.4",
"@semantic-release/release-notes-generator": "^10.0.3",
"@tsconfig/node12": "^1.0.9",
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^5.20.0",
Expand Down

0 comments on commit 044d46e

Please sign in to comment.