chore: update test

This commit is contained in:
0song
2025-10-15 20:37:33 +08:00
parent a77a91788f
commit 054c138caa
4 changed files with 54 additions and 0 deletions

29
.github/workflows/test-npm.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Publish Package via OIDC
on:
workflow_dispatch: # 手动触发
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Ensure latest npm
run: npm install -g npm@latest
- name: Publish to npm (OIDC)
working-directory: ./test-npm
run: npm publish

1
test-npm/index.js Normal file
View File

@@ -0,0 +1 @@
console.log('test')

13
test-npm/package-lock.json generated Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "@element-plus/nightly",
"version": "0.0.2025092801",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@element-plus/nightly",
"version": "0.0.2025092801",
"license": "ISC"
}
}
}

11
test-npm/package.json Normal file
View File

@@ -0,0 +1,11 @@
{
"name": "@element-plus/nightly",
"version": "0.0.2025092801",
"description": "test",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}