Skip to content

Commit

Permalink
ci: use artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
tasshi-me committed Oct 23, 2024
1 parent fe9bdcc commit 2b17ea9
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,32 @@ on:
pull_request:

jobs:
# prepare:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v3
# - uses: actions/setup-node@v4
# with:
# node-version: "18"
# cache: "pnpm"
#
# - name: Install dependencies
# run: pnpm install --frozen-lockfile
# - run: pnpm build
# - run: pnpm pack
# - id: upload-artifact
# uses: actions/upload-artifact@v4
# with:
# name: kintone-cli.tgz
# path: kintone-cli-*.tgz
# outputs:
# artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm pack
- run: mv kintone-cli-*.tgz kintone-cli.tgz
- id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: kintone-cli.tgz
path: kintone-cli.tgz
outputs:
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}

test-install:
name: Test npm install - Node.js ${{ matrix.os }} ${{ matrix.node-version }}
needs: prepare
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -41,11 +43,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g @kintone/cli
- uses: actions/download-artifact@v4
with:
name: kintone-cli.tgz
- run: npm install -g kintone-cli.tgz
- run: cli-kintone --version

test-npx:
name: Test npx - Node.js ${{ matrix.os }} ${{ matrix.node-version }}
needs: prepare
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -55,4 +61,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npx @kintone/cli --version
- uses: actions/download-artifact@v4
with:
name: kintone-cli.tgz
- run: npx kintone-cli.tgz --version

0 comments on commit 2b17ea9

Please sign in to comment.