Skip to content

Commit

Permalink
mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahqsoftwares committed Sep 1, 2024
1 parent 613b629 commit 49eb600
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
result-encoding: string
script: |
const version = await require("./index.cjs")();
const version = await require("./index.mjs")();
console.log(`Version: ${version}`);
return version;
Expand Down
12 changes: 5 additions & 7 deletions index.cjs → index.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = async function () {
const { Octokit } = require("octokit");
import { Octokit } from "octokit";

export default async function () {
const { version } = require("./tauri/package.json");

const client = new Octokit({
Expand All @@ -16,11 +16,9 @@ module.exports = async function () {
});

return release.data.id;
};

module.exports.release = async function () {
const { Octokit } = require("octokit");
}

export async function release() {
const client = new Octokit({
auth: process.env.token,
});
Expand All @@ -31,4 +29,4 @@ module.exports.release = async function () {
release_id: process.env.release_id,
draft: false,
});
};
}

0 comments on commit 49eb600

Please sign in to comment.