Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
32 changes: 32 additions & 0 deletions .github/workflows/release_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Cordova Plugin (GitHub)

on:
workflow_dispatch:

permissions:
contents: write

jobs:
release:
runs-on: 'ubuntu-latest'
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
with:
ref: outsystems
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN_GITHUB }}
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 25
- name: Install dependencies
run: npm ci
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN_GITHUB }}
run: npm run release
14 changes: 14 additions & 0 deletions .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Trigger Release (outsystems branch)

on:
workflow_dispatch:

jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Dispatch release workflow on outsystems branch
run: gh workflow run release_plugin.yml --ref outsystems
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN_GITHUB }}
GH_REPO: ${{ github.repository }}
28 changes: 28 additions & 0 deletions .github/workflows/validate_pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Validate PR title for Conventional Commits Format"

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
validate-pr-title-conventional:
runs-on: ubuntu-latest
steps:
- name: Check PR title for conventional commits
uses: actions/github-script@v6
with:
github-token: ${{ github.token }}
script: |
const prTitle = context.payload.pull_request.title;

// Conventional commits regex: type(scope?): description
const conventionalRegex = /^(feat|fix|chore|docs|style|refactor|perf|test|ci)(\([a-z0-9\-]+\))?: .+/;

if (!conventionalRegex.test(prTitle)) {
core.setFailed(
`PR title "${prTitle}" is not in conventional commit format.\n` +
`Example: "feat(android): add new validation function"`
);
} else {
console.log(`PR title "${prTitle}" follows conventional commit format`);
}
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@
"scripts": {
"clean-spec": "rm -rf spec/[mnp]* && git cl spec/config.xml && git status --ignored",
"prepare-js": "coffee -p SQLitePlugin.coffee.md > www/SQLitePlugin.js",
"prepare-spec": "node scripts/prepareSpec.js"
"prepare-spec": "node scripts/prepareSpec.js",
"release": "node scripts/release.js"
},
"devDependencies": {
"@octokit/rest": "^21.0.2",
"coffeescript": "1",
"cross-spawn": "^6.0.5",
"fs-extra": "^8.1.0"
"fs-extra": "^8.1.0",
"simple-git": "^3.25.0",
"xml2js": "^0.6.2"
}
}
Loading
Loading