-
Notifications
You must be signed in to change notification settings - Fork 1
chore(ci): add release workflows #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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! --> |
| 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 |
| 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 |
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 }} | ||
There was a problem hiding this comment.
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