-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Hi - I've found myself going for a GitHub Actions workflow like this:
name: pkg.pr.new
on:
push: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g [email protected] # todo: delete if https://github.com/nodejs/corepack/issues/612 is resolved
- run: corepack enable
- name: set package.json version
# note: if dependencies are a "real" version that matches the repo's package.json, pnpm uses the cached version. So patch to a dev, timestamped version.
run: |
sed -i 's|"version":|"version": "0.0.0-dev-todaysdate","oldversion":|g' package.json
sed -i "s|todaysdate|$(date +%Y%m%d%H%M%S)|g" package.json
- run: pnpm install
- run: pnpm build
- run: pnpm pkg-pr-new publishTo make sure all tools (and humans) know that the version installed is not the "real" one from the npm registry. It'd be great if I could do this by passing a CLI argument or something, which used the commit hash to set the version field, or something like that.
lishaduck
Metadata
Metadata
Assignees
Labels
No labels