Skip to content

Commit

Permalink
ci: use run_id as snapshot id
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Oct 29, 2024
1 parent 72c55ff commit 849deca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish-from-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: |
npm version $(node --eval="process.stdout.write(require('./package.json').version)")-pr.$(git rev-parse --short HEAD) --no-git-tag-version
npm version $(node --eval="process.stdout.write(require('./package.json').version)")-pr.${{ github.run_id }} --no-git-tag-version
npm publish --provenance --access=public --no-git-tag-version --tag pr
2 changes: 2 additions & 0 deletions src/scripts/build-from-remote.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface TContext {
repoCommit: string
npmToken: string
npmRegistry: string
output?: string
}

export const protect = (env = process.env) => {
Expand Down Expand Up @@ -71,6 +72,7 @@ export const buildFromRemote = async (av = argv, env = process.env)=> {
const ctx = createContext(av, env)
await fetchSource(ctx)
await buildSource(ctx)
ctx.output && await fs.outputJson(ctx)
}

;(async() => {
Expand Down

0 comments on commit 849deca

Please sign in to comment.