Skip to content

Commit

Permalink
build: release @myparcel-do/shared
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Mar 13, 2024
1 parent 543dade commit 5521f8b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ jobs:
--output-style="static" \
--target="build"
- name: 'Release'
- name: 'Release @myparcel-do/shared'
working-directory: libs/shared
# language=sh
run: |
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 'Release @myparcel/delivery-options'
working-directory: apps/delivery-options
# language=sh
run: |
Expand Down
6 changes: 3 additions & 3 deletions apps/delivery-options/vite-myparcel-lib.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {copyFileSync} from 'node:fs';
import {writeFileSync} from 'node:fs';
import dts from 'vite-plugin-dts';
import {mergeConfig, type UserConfig} from 'vite';
import {createViteConfig} from '@myparcel-do/build-vite';
Expand All @@ -15,8 +15,8 @@ export default createViteConfig((env) => {
entryRoot: 'src',
rollupTypes: true,
afterBuild: () => {
// To please publint, we need to copy the .d.ts file to .d.cts
copyFileSync('dist/index.d.ts', 'dist/index.d.cts');
// To please publint, we need to also have a .d.cts file
writeFileSync('dist/index.d.cts', "export * from './index';");
},
}),
],
Expand Down
3 changes: 0 additions & 3 deletions libs/semantic-release-plugin/src/publish/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {getPackageJson, hasErrors, throwIfHasErrors} from '../utils';
import {type PublishCmd} from '../types';
import {removeWorkspaceDependencies} from './removeWorkspaceDependencies';
import {publishNpmPackage} from './publishNpmPackage';
import {gitPush} from './gitPush';

Expand All @@ -15,8 +14,6 @@ export const publish: PublishCmd = async (pluginConfig, context) => {
return;
}

await removeWorkspaceDependencies(context);

if (!hasErrors()) {
await publishNpmPackage(context);
}
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion libs/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@myparcel-do/shared",
"version": "6.0.0-beta.1",
"private": true,
"description": "",
"repository": {
"type": "git",
Expand Down
26 changes: 26 additions & 0 deletions libs/shared/release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable no-template-curly-in-string */
const {
addCommitAnalyzerPlugin,
addGitHubActionsOutputPlugin,
addReleaseNotesGeneratorPlugin,
} = require('@myparcel/semantic-release-config/src/plugins');
const mainConfig = require('@myparcel/semantic-release-config');

/**
* @type {import('semantic-release').Options}
*/
module.exports = {
...mainConfig,
extends: 'semantic-release-monorepo',
tagFormat: 'v${version}',
plugins: [
addCommitAnalyzerPlugin(),
addGitHubActionsOutputPlugin(),
addReleaseNotesGeneratorPlugin(),

/*
* Includes npm and git functionality
*/
'@myparcel-do/semantic-release-plugin',
],
};

0 comments on commit 5521f8b

Please sign in to comment.