Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment I made about the PR template applies here, and actually the argument of the templates diverging also apply here now, as there was a fix I just merged for this template (which was preventing it from showing up in repos) - ionic-team/.github#11

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Bug Report
description: File a bug report
title: ""
labels: ["triage"]
type: "bug"
body:
- type: markdown
attributes:
value: |
## Thanks for taking the time to fill out this bug report!
Before creating a bug report, be sure to keep the following points in mind:
- Search existing reports to make sure there isn't already an existing bug report.
- Make sure this is the correct project for your report. If the report is related to a plugin or Capacitor core, create the bug report on that GitHub project instead.
- Feel free to chat with us in [discussions](https://github.com/ionic-team/capacitor/discussions) if you are unsure whether something is a bug or feature request.
- type: textarea
id: description
attributes:
label: Description
description: "Give a detailed explanation of the bug you've encountered."
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: "Describe what you expected to happen, or what should be the correct behavior."
validations:
required: true
- type: input
id: reproduction
attributes:
label: Reproduction
description: "Include a link to a minimal test project that demonstrates the bug."
validations:
required: false
- type: textarea
id: media
attributes:
label: Screenshots / Media
description: "Include screenshots, video recordings or other collateral that helps illustrate the problem described in the bug."
validations:
required: false
- type: textarea
id: env-details
attributes:
label: Environment Details
description: "Please provide the following information with your request and any other relevant technical details (versions of IDEs, local environment info, plugin information or links, etc)."
placeholder: |
OS version:
`npx cap doctor` output:
npm --version output:
node --version output:
pod --version output (iOS Cocoapods issues only):
render: Shell
validations:
required: false
- type: checkboxes
id: versions-affected
attributes:
label: Versions Affected
description: "Check the versions that this bug is related to."
options:
- label: 7.x
required: false
- label: 8.x
required: false
- label: 9.x
required: false
- type: checkboxes
id: platforms-affected
attributes:
label: Platforms Affected
description: "Check the platforms that this bug is related to."
options:
- label: iOS
required: false
- label: Android
required: false
- label: Web
required: false
- type: textarea
id: notes
attributes:
label: Notes / Comments
description: "Anything else we need to know to help? Include it here."
validations:
required: false
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment I made about the other templates also apply here, but this one has the extra argument that we may not even want a template on GitHub anymore, as canny is now the go-to for feature requests, so probably what we want is to link to canny instead.

As such I think this feature request template one should be removed from this repo.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Feature Request
description: Request a new feature
title: ""
labels: ["triage"]
type: "feature"
body:
- type: markdown
attributes:
value: |
## Thanks for your input on enhancements to Capacitor!
Before creating a feature request, be sure to keep the following points in mind:
- Search existing feature requests to make sure there isn't already an existing request.
- Make sure this is the correct project for your request. If the request is related to a plugin or Capacitor core, create the request on that relevant GitHub project instead.
- Make sure feature requests are relevant to the goals of the project. If you are unsure, feel free to chat with us in [discussions](https://github.com/ionic-team/capacitor/discussions).
- type: textarea
id: description
attributes:
label: Feature Description
description: "Describe the feature you would like to see."
validations:
required: true
- type: textarea
id: implementation
attributes:
label: Potential Implementation
description: "Describe any potential implementation or preferred solution for this feature, or examples of solutions in the wild."
validations:
required: false
- type: checkboxes
id: supported-platforms
attributes:
label: Supported Platforms
description: "Check the platforms this feature request is relevant to."
options:
- label: iOS
required: false
- label: Android
required: false
- label: Web
required: false
- type: textarea
id: alternatives
attributes:
label: Alternatives
description: "Describe some alternatives, if any."
validations:
required: false
- type: textarea
id: notes
attributes:
label: Notes / Comments
description: "Include any other information about the feature request here, for example, potential use cases, benefits, etc."
validations:
required: false
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if it's relevant to have this template here, rather than just use what already comes with the org @ https://github.com/ionic-team/.github/blob/main/.github/pull_request_template.md (if you open a PR to main in this repo, you should already see the template).

To me it makes sense for the repo to have a PR template if it were to differ from the org one, but this one looks the exact same, unless you have another reason?

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Description
<!--- Describe your changes in detail -->

## Change Type
- [ ] Fix
- [ ] Feature
- [ ] Refactor
- [ ] Breaking Change
- [ ] Documentation

## Rationale / Problems Fixed
<!--- Give us more information about why you think this PR is needed, or what problems it fixes -->
<!--- Be sure to place links to related issues or discussions here -->

## Tests or Reproductions
<!--- Include a link to a minimal test project that can be used to validate the changes -->
<!--- Alternatively, describe how you tested your changes in detail -->
<!--- The easier it is to test and validate your pull request, the faster it can be reviewed -->

## Screenshots / Media
<!--- Include screenshots, videos or other files relevant to the pull request -->

## Versions Affected
- [ ] 7.x
- [ ] 8.x
- [ ] 9.x

## Platforms Affected
- [ ] Android
- [ ] iOS
- [ ] Web

## Notes / Comments
<!--- Put anything else here that would be good for us to know! -->
50 changes: 50 additions & 0 deletions .github/workflows/publish_android_maven_central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Capacitor Plugin to Maven Central

on:
workflow_call:
secrets:
ANDROID_CENTRAL_USERNAME:
required: true
ANDROID_CENTRAL_PASSWORD:
required: true
ANDROID_SIGNING_KEY_ID:
required: true
ANDROID_SIGNING_PASSWORD:
required: true
ANDROID_SIGNING_KEY:
required: true
ANDROID_SONATYPE_STAGING_PROFILE_ID:
required: true
CAP_GH_RELEASE_TOKEN:
required: true
workflow_dispatch:

jobs:
publish-android:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.ref_name }} # explicitly set ref to include commit from `semantic-release`
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'zulu'
- name: Grant execute permission for publishing script
run: chmod +x ./scripts/publish-android.sh
- name: Run publish script
env:
ANDROID_CENTRAL_USERNAME: ${{ secrets.ANDROID_CENTRAL_USERNAME }}
ANDROID_CENTRAL_PASSWORD: ${{ secrets.ANDROID_CENTRAL_PASSWORD }}
ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }}
ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }}
run: ./scripts/publish-android.sh
39 changes: 39 additions & 0 deletions .github/workflows/publish_ios_cocoapods_trunk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Capacitor Plugin to CocoaPods Trunk

on:
workflow_call:
secrets:
COCOAPODS_TRUNK_TOKEN:
required: true
CAP_GH_RELEASE_TOKEN:
required: true
workflow_dispatch:

jobs:
publish-ios:
runs-on: macos-15
if: github.ref == 'refs/heads/main'
timeout-minutes: 30
steps:
- run: sudo xcode-select --switch /Applications/Xcode_26.0.app
- run: xcrun simctl list > /dev/null
- run: xcodebuild -downloadPlatform iOS
- uses: actions/setup-node@v6
with:
node-version: 22
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.ref_name }} # explicitly set ref to include commit from `semantic-release`
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: Install Cocoapods
run: |
gem install cocoapods
- name: Grant execute permission for publishing script
run: chmod +x ./scripts/publish-ios.sh
- name: Deploy to Cocoapods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
set -eo pipefail
./scripts/publish-ios.sh
68 changes: 68 additions & 0 deletions .github/workflows/release_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Release Plugin"

on:
push:
branches:
- development
- next
workflow_dispatch:

permissions:
contents: write
issues: write
deployments: write
id-token: write # to enable use of OIDC for npm provenance and trusted publishing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder that you need to set trusted publishing for the @capacitor/camera npm package at (requires authentication)

Didn't check if you have, but if you haven't, here's npm docs: https://docs.npmjs.com/trusted-publishers

I've done this before, so if you have questions you can ping me.


jobs:
setup:
uses: ./.github/workflows/reusable_setup.yml
secrets:
THE_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}

lint:
needs: 'setup'
uses: ./.github/workflows/reusable_lint.yml
secrets:
THE_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}

build-packages:
needs: 'setup'
uses: ./.github/workflows/reusable_build.yml
secrets:
THE_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}

release:
needs: ['setup','lint','build-packages']
runs-on: 'ubuntu-latest'
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
run: npx semantic-release

publish-android:
needs: ['release']
uses: ./.github/workflows/publish_android_maven_central.yml
secrets:
ANDROID_CENTRAL_USERNAME: ${{ secrets.ANDROID_CENTRAL_USERNAME }}
ANDROID_CENTRAL_PASSWORD: ${{ secrets.ANDROID_CENTRAL_PASSWORD }}
ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }}
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }}
ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }}
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}

publish-ios:
needs: ['release']
uses: ./.github/workflows/publish_ios_cocoapods_trunk.yml
secrets:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
apply plugin: 'io.github.gradle-nexus.publish-plugin'
apply from: file('../../scripts/android/publish-root.gradle')
apply from: file('../../scripts/android/publish-module.gradle')
apply from: file('../scripts/android/publish-root.gradle')
apply from: file('../scripts/android/publish-module.gradle')
}

android {
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@
"rimraf": "^6.1.0",
"rollup": "^4.53.2",
"swiftlint": "^2.0.0",
"typescript": "^5.9.3"
"typescript": "^5.9.3",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^7.1.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^12.0.2",
"@semantic-release/npm": "^13.1.2",
"semantic-release": "^25.0.2"
},
"peerDependencies": {
"@capacitor/core": ">=8.0.0"
Expand Down
Loading
Loading