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

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

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

- package-ecosystem: npm
directory: /TestRunner/app/tests
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared/Require/PackageJsonApp/io
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared/Require/PackageJsonAppNoMain/io
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared/Require/PackageJsonAppWithoutExtension/io
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared/Require/PackageJsonMainPointsToDir
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared/Require/PackageJsonSyntaxError/io
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared/Require/ResolveCanonicalPath
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tests/shared
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tns_modules/dummy-package
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tns_modules/tns-core-modules/shared/Require/PackageJsonTns/io
schedule:
interval: daily

- package-ecosystem: npm
directory: /TestRunner/app/tns_modules/tns-core-modules/shared/Require/RequirePriority/dependency5
schedule:
interval: daily

- package-ecosystem: npm
directory: /
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", "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
62 changes: 41 additions & 21 deletions .github/workflows/npm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,28 @@ jobs:
npm_version: ${{ steps.npm_version_output.outputs.NPM_VERSION }}
npm_tag: ${{ steps.npm_version_output.outputs.NPM_TAG }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: ${{env.XCODE_VERSION}}
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: LLVM cache
uses: actions/cache@v3
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
with:
path: ./llvm
key: ${{ hashFiles('download_llvm.sh') }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: "3"
- name: Install Dependencies
Expand Down Expand Up @@ -61,12 +66,12 @@ jobs:
- name: Build
run: npm run build-ios
- 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-ios-${{steps.npm_version_output.outputs.NPM_VERSION}}.tgz
- name: Upload dSYMs artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: NativeScript-dSYMs
path: dist/dSYMs
Expand All @@ -75,20 +80,25 @@ jobs:
runs-on: macos-14
needs: build
steps:
- uses: maxim-lobanov/setup-xcode@v1
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: ${{env.XCODE_VERSION}}
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: LLVM cache
uses: actions/cache@v3
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
with:
path: ./llvm
key: ${{ hashFiles('download_llvm.sh') }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 20
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: "3"
- name: Install Dependencies
Expand All @@ -106,7 +116,7 @@ jobs:
mkdir -p dist-test
echo TEST_FOLDER=$(pwd)/dist-test >> $GITHUB_ENV
- name: Xcode Tests
uses: nick-fields/retry@v2
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
# try to run the tests with xcpretty. If it fails then try again without xcpretty twice for better log output
# the xcode tests are a bit flaky and they should never fail on this step, as this step only collects the JS test results as junit xml
with:
Expand All @@ -122,7 +132,7 @@ jobs:
find $TEST_FOLDER/test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx verify-junit-xml
- name: Archive Test Result Data
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results
path: ${{env.TEST_FOLDER}}/test_results.xcresult
Expand All @@ -138,11 +148,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: 20
registry-url: "https://registry.npmjs.org"
- uses: actions/[email protected]
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: npm-package
path: dist
Expand All @@ -164,19 +179,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: 20
- name: Setup
run: npm install
- uses: actions/[email protected]
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: npm-package
path: dist
- uses: actions/[email protected]
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: NativeScript-dSYMs
path: dist/dSYMs
Expand All @@ -185,7 +205,7 @@ jobs:
run: find . -maxdepth 1 -name '*.dSYM' -print | xargs -I@ zip -r @.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-ios-*.tgz,dist/dSYMs/*.zip"
bodyFile: "body.md"
Expand Down
Loading