Skip to content

Commit

Permalink
chore: Disable build
Browse files Browse the repository at this point in the history
  • Loading branch information
aXenDeveloper committed Jun 30, 2024
1 parent 402f41d commit a35f6f7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,49 +43,49 @@ jobs:
registry-url: 'https://registry.npmjs.org/'
node-version: 20

- name: Run script
- name: Install dependencies
run: pnpm install

- name: Run script to bump version
run: pnpm run release
id: version-bump
env:
VERSION_TYPE: ${{ github.event.inputs.type }}
RELEASE_TYPE: ${{ github.event.inputs.release }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: pnpm install

- name: Build CLI
run: pnpm run build:scripts

- name: Build Projects
run: pnpm run build

- name: Create Pre-release
if: github.event.inputs.release == 'canary' || github.event.inputs.release == 'release-candidate'
run: gh release create ${{ steps.version-bump.outputs.newTag }} --generate-notes --prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Pre-release
# if: github.event.inputs.release == 'canary' || github.event.inputs.release == 'release-candidate'
# run: gh release create ${{ steps.version-bump.outputs.newTag }} --generate-notes --prerelease
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: github.event.inputs.release == 'stable'
run: gh release create ${{ steps.version-bump.outputs.newTag }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Release
# if: github.event.inputs.release == 'stable'
# run: gh release create ${{ steps.version-bump.outputs.newTag }} --generate-notes
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish canary
if: github.event.inputs.release == 'canary'
run: npm publish --provenance --access public --workspace vitnode-backend --workspace vitnode-frontend --workspace vitnode-shared --workspace create-vitnode-app --workspace eslint-config-vitnode --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish canary
# if: github.event.inputs.release == 'canary'
# run: npm publish --provenance --access public --workspace vitnode-backend --workspace vitnode-frontend --workspace vitnode-shared --workspace create-vitnode-app --workspace eslint-config-vitnode --tag canary
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish release candidate
if: github.event.inputs.release == 'release-candidate'
run: npm publish --provenance --access public --workspace vitnode-backend --workspace vitnode-frontend --workspace vitnode-shared --workspace create-vitnode-app --workspace eslint-config-vitnode --tag rc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish release candidate
# if: github.event.inputs.release == 'release-candidate'
# run: npm publish --provenance --access public --workspace vitnode-backend --workspace vitnode-frontend --workspace vitnode-shared --workspace create-vitnode-app --workspace eslint-config-vitnode --tag rc
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish stable
if: github.event.inputs.release == 'stable'
run: pnpm publish --provenance --access public --workspace vitnode-backend --workspace vitnode-frontend --workspace vitnode-shared --workspace create-vitnode-app --workspace eslint-config-vitnode
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish stable
# if: github.event.inputs.release == 'stable'
# run: pnpm publish --provenance --access public --workspace vitnode-backend --workspace vitnode-frontend --workspace vitnode-shared --workspace create-vitnode-app --workspace eslint-config-vitnode
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34 changes: 17 additions & 17 deletions bump-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ function logError(error) {
newVersion = `${tagPrefix}${newVersion}${tagSuffix}`;

// Bump the version
await runInWorkspace('npm', [
'version',
'--git-tag-version=false',
'--commit-hooks=false',
'--workspaces',
'--workspaces-update=false',
newVersion,
]);
// await runInWorkspace('npm', [
// 'version',
// '--git-tag-version=false',
// '--commit-hooks=false',
// '--workspaces',
// '--workspaces-update=false',
// newVersion,
// ]);

// Expose the new version
await runInWorkspace('sh', [
Expand All @@ -257,15 +257,15 @@ function logError(error) {
await runInWorkspace('git', ['checkout', currentBranch]);

// Create a commit
await runInWorkspace('git', [
'commit',
'-a',
'-m',
commitMessage.replace(/{{version}}/g, newVersion),
]);

const remoteRepo = `https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git`;
await runInWorkspace('git', ['push', remoteRepo]);
// await runInWorkspace('git', [
// 'commit',
// '-a',
// '-m',
// commitMessage.replace(/{{version}}/g, newVersion),
// ]);

// const remoteRepo = `https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git`;
// await runInWorkspace('git', ['push', remoteRepo]);
exitSuccess('Version bumped!');
} catch (e) {
logError(e);
Expand Down

0 comments on commit a35f6f7

Please sign in to comment.