Skip to content
Open
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
101 changes: 101 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: npm
directory: /
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/app/src/main/assets/app
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/app/src/main/assets/app/tests
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/app/src/main/assets/app/tns_modules/dummy-package
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/android-metadata-generator
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/component/not_ns_subcomponent
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/component
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/components_collection/component1
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/components_collection/component2
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/components_collection/component2/subcomponent2.1
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/components_collection
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/not_ns_module/not_ns_module_submodule
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules/not_ns_module
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests/cases/mini_app/app/tns_modules
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/build-tools/jsparser/tests
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app
schedule:
interval: daily

- package-ecosystem: npm
directory: /test-app/tools
schedule:
interval: daily
78 changes: 78 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["cpp", "java", "javascript", "python", "typescript"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
with:
category: "/language:${{matrix.language}}"
27 changes: 27 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
59 changes: 41 additions & 18 deletions .github/workflows/npm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ env:
ANDROID_ABI: x86_64
NDK_ARCH: darwin

permissions:
contents: read

jobs:
build:
name: Build
Expand All @@ -21,21 +24,26 @@ jobs:
npm_version: ${{ steps.npm_version_output.outputs.NPM_VERSION }}
npm_tag: ${{ steps.npm_version_output.outputs.NPM_TAG }}
steps:
- uses: actions/checkout@v3
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
- uses: actions/setup-java@v3
- uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1
with:
distribution: "temurin"
java-version: "21"
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # v2.0.10
- name: Homebrew dependencies
run: |
brew install wget
Expand Down Expand Up @@ -73,12 +81,12 @@ jobs:
- name: Build npm package
run: ./gradlew -PgitCommitVersion=${{ github.sha }} -PnoCCache --stacktrace
- name: Upload npm package artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: npm-package
path: dist/nativescript-android-${{steps.npm_version_output.outputs.NPM_VERSION}}.tgz
- name: Upload debug symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: debug-symbols
path: test-app/runtime/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib/*
Expand All @@ -88,20 +96,25 @@ jobs:
runs-on: macos-13
needs: build
steps:
- uses: actions/checkout@v3
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
- uses: actions/setup-java@v3
- uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1
with:
distribution: "temurin"
java-version: "21"
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # v2.0.10
- name: Homebrew dependencies
run: |
brew install wget
Expand All @@ -123,7 +136,7 @@ jobs:
- name: SBG tests
run: ./gradlew runSbgTests --stacktrace
- name: Run unit tests
uses: ReactiveCircus/android-emulator-runner@v2
uses: ReactiveCircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
with:
api-level: ${{env.ANDROID_API}}
# this is needed on API 30+
Expand All @@ -142,11 +155,16 @@ jobs:
NPM_VERSION: ${{needs.build.outputs.npm_version}}
NPM_TAG: ${{needs.build.outputs.npm_tag}}
steps:
- uses: actions/setup-node@v3
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: npm-package
path: dist
Expand All @@ -168,19 +186,24 @@ jobs:
env:
NPM_VERSION: ${{needs.build.outputs.npm_version}}
steps:
- uses: actions/checkout@v3
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 22
- name: Setup
run: npm install
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: npm-package
path: dist
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: debug-symbols
path: dist/debug-symbols
Expand All @@ -189,7 +212,7 @@ jobs:
run: zip -r debug-symbols.zip .
- name: Partial Changelog
run: npx conventional-changelog -p angular -r2 > body.md
- uses: ncipollo/release-action@v1
- uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
artifacts: "dist/nativescript-android-*.tgz,dist/debug-symbols/debug-symbols.zip"
bodyFile: "body.md"
Expand Down
Loading