Skip to content

feat: add IDisplayableOSNotification type (#133) #203

feat: add IDisplayableOSNotification type (#133)

feat: add IDisplayableOSNotification type (#133) #203

Workflow file for this run

name: Submit Downstream PRs
on:
push:
branches: [main]
workflow_dispatch:
env:
TERM: xterm-256color
jobs:
setup:
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.version.outputs.version }}
steps:
- name: '[Setup] Checkout Repository'
uses: actions/checkout@v6
- name: '[Setup] Node'
uses: actions/setup-node@v6
with:
node-version: 18
- name: '[Setup] Bootstrap Dependencies'
run: npm ci
- name: 'Get current web-shim-codegen version'
id: version
run: |
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: '[Setup] Build'
run: npm run build
- name: 'Upload dist artifacts'
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 1
sync-repo:
needs: setup
name: ${{ matrix.sdk_name }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
strategy:
matrix:
include:
- repo: onesignal-ngx
sdk_name: angular
dist_path: dist/onesignal-ngx.tgz
clone_path: __clone/onesignal-ngx
- repo: react-onesignal
sdk_name: react
dist_path: dist/react.tgz
clone_path: __clone/react
- repo: onesignal-vue
sdk_name: vue2
dist_path: dist/vue/v2.tgz
clone_path: __clone/vue/v2
- repo: onesignal-vue3
sdk_name: vue3
dist_path: dist/vue/v3.tgz
clone_path: __clone/vue/v3
steps:
- name: '[Setup] Checkout Repository'
uses: actions/checkout@v6
- name: '[Setup] Git'
run: |
git config --global user.email "noreply@onesignal.com"
git config --global user.name "OneSignal"
- name: 'Download dist artifacts'
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: '[${{ matrix.repo }}] Checkout'
uses: actions/checkout@v6
with:
token: ${{ secrets.GH_PUSH_TOKEN }}
repository: OneSignal/${{ matrix.repo }}
fetch-depth: 0
path: ${{ matrix.clone_path }}
- name: '[${{ matrix.repo }}] Patch'
run: |
bash scripts/patch-repo.sh ${{ matrix.dist_path }} ${{ matrix.clone_path }} ${{ matrix.repo }}
env:
PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
- name: '[${{ matrix.repo }}] Push'
uses: ad-m/github-push-action@v0.6.0
with:
repository: OneSignal/${{ matrix.repo }}
directory: ${{ matrix.clone_path }}
force: true
branch: cd_update
github_token: ${{ secrets.GH_PUSH_TOKEN }}
- name: '[${{ matrix.repo }}] Submit PR'
uses: ./.github/actions/create-pr
with:
owner: 'OneSignal'
repo: ${{ matrix.repo }}
package_version: ${{ needs.setup.outputs.package_version }}
github_token: ${{ secrets.GH_PUSH_TOKEN }}