ci: modernize GitHub workflows and templates

Update CI workflow: restrict triggers to master+PRs, add concurrency
groups and npm cache. Update release-please and stale workflows to
latest action versions. Replace single ISSUE_TEMPLATE.md with YAML-
based templates (bug report, feature request, config). Rewrite
CONTRIBUTING.md for awesome-cordova-plugins.
This commit is contained in:
Daniel Sogl
2026-03-21 15:11:31 -07:00
parent 61970e4a8b
commit 01f6257ebf
8 changed files with 183 additions and 101 deletions
+27 -13
View File
@@ -1,19 +1,33 @@
# Contributing to Ionic Native
# Contributing to Awesome Cordova Plugins
## Have an issue?
#### There are no rules, but here are a few things to consider:
###### Before you submit an issue:
* Do a quick search to see if there are similar issues
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/api/platform/Platform/#ready).
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save @ionic-native/core@latest`
###### Still having problems? submit an issue with the following details:
* Short description of the issue
* Steps to reproduce
* Stack trace (if available)
Before submitting an issue:
- Search existing issues to avoid duplicates
- Make sure you are using the latest version of `@awesome-cordova-plugins/core`
- Ensure `deviceready` has fired before interacting with any plugin
## Feature request?
Have a plugin you'd like to see supported? Since Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whatever plugin you'd like to add.
Still having problems? [Open an issue](https://github.com/danielsogl/awesome-cordova-plugins/issues/new/choose) with:
Take a look at our [Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
- Short description of the issue
- Steps to reproduce
- Stack trace (if available)
**Please do not submit support requests as issues.** Use the [Discussions](https://github.com/danielsogl/awesome-cordova-plugins/discussions) section instead.
## Want to add a plugin?
Awesome Cordova Plugins is a set of wrappers for Cordova plugins. Adding support for a new plugin is straightforward:
1. Run `npm run plugin:create -- -n PluginName` to scaffold a new plugin wrapper
2. Implement the wrapper following the patterns in existing plugins
3. Submit a pull request
## Development setup
```bash
npm ci
npm run build
npm test
```
-28
View File
@@ -1,28 +0,0 @@
**I'm submitting a ...** (check one with "x")
- [ ] bug report
- [ ] feature request
- [ ] support request => Please do not submit support requests here, use the discussions section https://github.com/danielsogl/awesome-cordova-plugins/discussions
**Current behavior:**
<!-- Describe how the bug manifests. -->
**Expected behavior:**
<!-- Describe what the behavior would be without the bug. -->
**Steps to reproduce:**
<!-- If you are able to illustrate the bug or feature request with an example, please provide steps to reproduce. -->
**Related code:**
```
insert any relevant code here
```
**Other information:**
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->
**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):
```
insert the output from ionic info here
```
+63
View File
@@ -0,0 +1,63 @@
name: Bug Report
description: Report a bug in an Awesome Cordova Plugins wrapper
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the sections below.
- type: input
id: plugin
attributes:
label: Plugin
description: Which @awesome-cordova-plugins/* package is affected?
placeholder: e.g. @awesome-cordova-plugins/camera
validations:
required: true
- type: textarea
id: current-behavior
attributes:
label: Current behavior
description: Describe what happens.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: Describe what you expected to happen.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: How can we reproduce the issue?
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: |
Relevant versions (fill in what you can):
value: |
- @awesome-cordova-plugins/core version:
- Cordova / Capacitor version:
- Angular version:
- Platform (iOS / Android / Browser):
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description: Any other information, stack traces, or screenshots.
validations:
required: false
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Support & Questions
url: https://github.com/danielsogl/awesome-cordova-plugins/discussions
about: Please use Discussions for support requests and questions.
@@ -0,0 +1,35 @@
name: Feature Request
description: Suggest a new plugin wrapper or enhancement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Have a plugin you'd like to see supported? Since Awesome Cordova Plugins
is a set of wrappers for Cordova plugins, adding support is as easy as
creating a new wrapper.
- type: textarea
id: description
attributes:
label: Description
description: What plugin or feature would you like to see added or improved?
validations:
required: true
- type: input
id: plugin-repo
attributes:
label: Cordova plugin repository
description: Link to the Cordova plugin (if requesting a new wrapper).
placeholder: https://github.com/example/cordova-plugin-example
validations:
required: false
- type: textarea
id: use-case
attributes:
label: Use case
description: Describe why this would be useful.
validations:
required: false
+18 -15
View File
@@ -1,21 +1,27 @@
name: Node CI
name: CI
on: [push]
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/checkout@v4.3.1
- name: Setup Node.js
uses: actions/setup-node@v4.4.0
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
@@ -23,11 +29,8 @@ jobs:
- name: Lint
run: npm run lint -- --quiet
- name: Test
run: npm test
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Readmes
run: npm run readmes
+13 -31
View File
@@ -2,9 +2,7 @@ name: Release Please
on:
push:
branches:
- master
# Manual trigger as backup
branches: [master]
workflow_dispatch:
permissions:
@@ -19,58 +17,42 @@ jobs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
pr: ${{ steps.release.outputs.pr }}
steps:
- name: Run Release Please
id: release
uses: googleapis/release-please-action@v4
uses: googleapis/release-please-action@v4.4.0
with:
# GitHub token for creating PRs and releases
token: ${{ secrets.GITHUB_TOKEN }}
# Use manifest-based configuration (advanced setup)
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Show Release Info
if: ${{ steps.release.outputs.release_created }}
run: |
echo "Release created: ${{ steps.release.outputs.release_created }}"
echo "Tag: ${{ steps.release.outputs.tag_name }}"
echo "Version: ${{ steps.release.outputs.version }}"
echo "PR: ${{ steps.release.outputs.pr }}"
# Trigger the existing build and publish workflow when a release is created
build-and-publish:
publish:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4.3.1
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v4.4.0
with:
node-version: "20"
cache: "npm"
registry-url: "https://registry.npmjs.org"
node-version: 22
cache: npm
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Lint
run: npm run lint -- --quiet
- name: Run tests
- name: Test
run: npm test
- name: Build packages
- name: Build
run: npm run build
- name: Generate README files
run: npm run readmes
- name: Publish all packages to NPM
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run npmpub
+22 -14
View File
@@ -1,22 +1,30 @@
name: Mark stale issues and pull requests
name: Stale issues and PRs
on:
schedule:
- cron: '0 0 * * *'
- cron: "0 6 * * 1"
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'There has been no recent activity and this issue has been marked inactive.'
stale-pr-message: 'There has been no recent activity and this PR has been marked inactive.'
stale-issue-label: 'status: inactive'
stale-pr-label: 'status: inactive'
- uses: actions/stale@v9.1.0
with:
stale-issue-message: >
This issue has been automatically marked as inactive due to lack of
recent activity. It will be closed in 14 days if no further activity
occurs.
stale-pr-message: >
This PR has been automatically marked as inactive due to lack of
recent activity. It will be closed in 14 days if no further activity
occurs.
stale-issue-label: "status: inactive"
stale-pr-label: "status: inactive"
days-before-stale: 60
days-before-close: 14
exempt-issue-labels: "pinned,keep"
exempt-pr-labels: "pinned,keep"