Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
chore(workflows): use deterministic version (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Oct 9, 2023
1 parent 609eed0 commit 471ee2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- run: npm config set "//registry.npmjs.org/:_authToken" "\${NPM_AUTH_TOKEN}" --location=global

- run: pnpm -r exec "if [ \"$(node -p \"require('./package.json').private\")\" = \"false\" ]; then npm publish --access public --tag latest --no-git-checks; fi"
- run: pnpm -r publish --access public --tag latest --no-git-checks
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

Expand Down
3 changes: 3 additions & 0 deletions packages/create-levain-app/src/ProjectProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import ExampleIndex from '@levain-examples/examples/dist/Example/index.json';
import { green } from 'picocolors';
import prompts from 'prompts';

import { version } from '../package.json';
import { isFolderEmpty } from './utils/FolderEmpty';
import { isNpmNameValid } from './utils/NpmNameValid';

export interface ProjectConfig {
path: string;
version: string;
template: {
packageName: string;
projectName: string;
Expand Down Expand Up @@ -65,6 +67,7 @@ export class ProjectProgram {

return {
path: res.path,
version,
template: ExampleIndex.find((example) => example.fields.template?.packageName === res.packageName)?.fields
.template!,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/create-levain-app/src/TemplateProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class TemplateProgram {
static async run(projectConfig: ProjectConfig): Promise<void> {
console.log(` Downloading ${blue(projectConfig.template.packageName)} into ${blue(`./${projectConfig.path}`)}`);
const installDir = join(process.cwd(), projectConfig.path);
const packageSpec = `${projectConfig.template.packageName}@latest`;
const packageSpec = `${projectConfig.template.packageName}@${projectConfig.version}`;
await pacote.extract(packageSpec, installDir);

await overridePackageJson(installDir, projectConfig);
Expand Down

1 comment on commit 471ee2d

@vercel
Copy link

@vercel vercel bot commented on 471ee2d Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.