Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v0.0.3-beta.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
npv2k1 committed Jul 6, 2023
2 parents b758869 + 03e433f commit 10a00fd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ jobs:
git config user.name '${{secrets.MAINTAINER_NAME}}'
git config user.email '${{secrets.MAINTAINER_EMAIL}}'
- name: Update package.json
run: |
# Extract the version from the git tag (e.g., "v1.0.0")
version=$(echo "${{ github.ref }}" | sed -e 's/^refs\/tags\/v//')
# Update the package.json version using Node.js script
node - <<EOF
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json'));
packageJson.version = "$version";
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2));
EOF
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
Expand Down Expand Up @@ -50,6 +63,8 @@ jobs:
- name: Build nextjs pages
run: pnpm run build



- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"dependencies": {
"unbuild": "^1.2.1"
}
}
}

0 comments on commit 10a00fd

Please sign in to comment.