Skip to content

Commit

Permalink
ci: fix auto-release (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Oct 18, 2024
1 parent fb3edfe commit 5834a09
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
*/

// For CommonJS use:
// const { readFile } = require('fs').promises;
// const { resolve } = require('path');
const { readFile } = require('fs').promises;
const { resolve } = require('path');

// For ES6 modules use:
import { readFile } from 'fs/promises';
import { resolve, dirname } from 'path';
import { fileURLToPath } from 'url';
// import { readFile } from 'fs/promises';
// import { resolve, dirname } from 'path';
// import { fileURLToPath } from 'url';

// Get env vars
const ref = process.env.GITHUB_REF;
Expand Down Expand Up @@ -106,8 +106,8 @@ async function config() {
async function loadTemplates() {
for (const template of Object.keys(templates)) {
// For ES6 modules use:
const fileUrl = import.meta.url;
const __dirname = dirname(fileURLToPath(fileUrl));
// const fileUrl = import.meta.url;
// const __dirname = dirname(fileURLToPath(fileUrl));

const filePath = resolve(__dirname, resourcePath, templates[template].file);
const text = await readFile(filePath, 'utf-8');
Expand All @@ -122,7 +122,7 @@ function getReleaseComment() {
}

// For CommonJS use:
// module.exports = config();
module.exports = config();

// For ES6 modules use:
export default config();
// export default config();

0 comments on commit 5834a09

Please sign in to comment.