Skip to content

Commit

Permalink
ci: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
uiolee committed Jan 1, 2024
1 parent 4228fc5 commit 80ae708
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ jobs:
with:
node-version: "lts/*"

- name: login to verdaccio
- name: login to 'verdaccio'
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873

- name: publish to verdaccio
- name: version for 'verdaccio'
run: |
npm version patch --commit-hooks false --git-tag-version false
- name: publish to 'verdaccio'
run: |
npm publish --registry http://localhost:4873
Expand All @@ -114,6 +118,10 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v4
# with:
# submodules: "recursive"

- uses: actions/download-artifact@v4
with:
name: artifact
Expand All @@ -122,6 +130,26 @@ jobs:
with:
node-version: "lts/*"

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
if: ${{ inputs.cache }}
with:
path: |
${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm add @actions/core -D

- name: config for test
run: |
mkdir ../temp
Expand Down
5 changes: 3 additions & 2 deletions scripts/getversion.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { readFileSync } from "node:fs";
import * as core from "@actions/core";
import { exportVariable } from "@actions/core";
const { version } = JSON.parse(readFileSync("package.json"));
console.info(version);
core.exportVariable("version", version);
// process.stdout.write(`::set-env name=version::${version}`);
exportVariable("version", version);

0 comments on commit 80ae708

Please sign in to comment.