diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3cf8df1..a9f1a7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,9 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: npm - name: Install NPM dependencies @@ -30,3 +33,40 @@ jobs: - name: Test run: npm run test:ci + + - uses: actions/upload-artifact@v4 + with: + name: app-build + path: | + ./dist + ./package*.json + + Deploy: + needs: [Build] + runs-on: ubuntu-latest + if: | + always() && + !contains(needs.*.result, 'cancelled') && + !contains(needs.*.result, 'failure') + # if: | + # always() && + # !contains(needs.*.result, 'cancelled') && + # !contains(needs.*.result, 'failure') && + # github.ref == 'refs/heads/main' + container: cloudfoundry/cli:latest + steps: + - name: Download pre-built app artifact + uses: actions/download-artifact@v4 + with: + name: app-build + + # - uses: actions/setup-node@v4 + # with: + # node-version: 22 + # cache: npm + + - name: Test CF + run: | + pwd + ls -la + cf --help diff --git a/package-lock.json b/package-lock.json index a1cff0a..1c84423 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,8 +36,8 @@ "typescript": "~5.8.3" }, "engines": { - "node": ">=20.0.0", - "npm": ">=9.0.0" + "node": "^22", + "npm": ">=9" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 76cadad..df6812a 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "type": "module", "private": true, "engines": { - "node": ">=20.0.0", - "npm": ">=9.0.0" + "node": "^22", + "npm": ">=9" }, "scripts": { "build": "rimraf dist && tsc",