|
| 1 | +name: 'release' |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + release: |
| 8 | + runs-on: macos-latest |
| 9 | + steps: |
| 10 | + - name: Checkout repository |
| 11 | + uses: actions/checkout@v4 |
| 12 | + with: |
| 13 | + fetch-depth: "0" |
| 14 | + submodules: true |
| 15 | + |
| 16 | + - name: setup node |
| 17 | + uses: actions/setup-node@v4 |
| 18 | + with: |
| 19 | + node-version: lts/* |
| 20 | + registry-url: 'https://registry.npmjs.org' |
| 21 | + |
| 22 | + - name: Install Python |
| 23 | + uses: actions/setup-python@v4 |
| 24 | + with: |
| 25 | + python-version: 3.12 |
| 26 | + |
| 27 | + - uses: oNaiPs/secrets-to-env-action@v1 |
| 28 | + with: |
| 29 | + secrets: ${{ toJSON(secrets) }} |
| 30 | + |
| 31 | + - name: Enable CorePack |
| 32 | + run: | |
| 33 | + corepack enable |
| 34 | + yarn config get globalFolder # the yarn command will ensure the correct yarn version is downloaded and installed |
| 35 | +
|
| 36 | + - name: Install NativeScript |
| 37 | + run: | |
| 38 | + python3 -m pip install --upgrade pip six |
| 39 | + npm i -g @akylas/nativescript-cli --ignore-scripts --legacy-peer-deps |
| 40 | + ns package-manager set yarn2 |
| 41 | + ns usage-reporting disable |
| 42 | + ns error-reporting disable |
| 43 | +
|
| 44 | + - name: Get yarn cache directory path |
| 45 | + id: yarn-cache-dir-path |
| 46 | + run: echo "::set-output name=dir::$(yarn config get globalFolder)" |
| 47 | + |
| 48 | + - name: Get yarn cache directory path |
| 49 | + id: yarn-cache-dir-path |
| 50 | + run: echo "::set-output name=dir::$(yarn config get globalFolder)" |
| 51 | + |
| 52 | + |
| 53 | + - name: Install deps |
| 54 | + if: steps.yarn-node_modules.outputs.cache-hit != 'true' |
| 55 | + uses: bahmutov/npm-install@v1 |
| 56 | + with: |
| 57 | + install-command: yarn install --silent |
| 58 | + env: |
| 59 | + YARN_ENABLE_IMMUTABLE_INSTALLS: false |
| 60 | + |
| 61 | + - name: Run shell prepare script |
| 62 | + if: ${{ hashFiles('scripts/ci.prepare.sh') != '' }} |
| 63 | + run: | |
| 64 | + sh scripts/ci.prepare.sh --platform ios |
| 65 | +
|
| 66 | + - name: build project |
| 67 | + run: | |
| 68 | + npm run build |
| 69 | +
|
| 70 | + - name: build typings |
| 71 | + run: | |
| 72 | + cd demo-svelte |
| 73 | + TNS_TYPESCRIPT_DECLARATIONS_PATH="$(pwd)/typings" ns build ios |
| 74 | + |
| 75 | + - uses: actions/upload-artifact@v4 |
| 76 | + with: |
| 77 | + name: ios_typings |
| 78 | + path: demo-svelte/typings/* |
| 79 | + |
0 commit comments