Skip to content

Commit

Permalink
reset
Browse files Browse the repository at this point in the history
  • Loading branch information
avigoldman committed Oct 24, 2021
1 parent 01d3562 commit 4917d32
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish Package
on: workflow_dispatch
# on:
# schedule:
# - cron: "0 0 * * *" # run once a day
on:
schedule:
- cron: "0 0 * * *" # run once a day
jobs:
publish-npm:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "caniemail2",
"version": "0.4.0",
"name": "caniemail",
"version": "0.0.0",
"description": "Can I email data",
"main": "index.js",
"author": "Avi Goldman <[email protected]>",
Expand All @@ -11,4 +11,4 @@
"semver": "^7.3.5",
"slugify": "^1.6.1"
}
}
}
39 changes: 18 additions & 21 deletions publish.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,32 @@ import slugify from "slugify";
internalTagName,
]);

console.log("Pushing update to GitHub");
console.log("Pushing update to GitHub...");

console.log(
(
await execa("git", [
"config",
"--global",
"user.name",
process.env.GITHUB_ACTOR,
])
).stdout
);
console.log(
(
await execa("git", [
"config",
"--global",
"user.email",
`${process.env.GITHUB_ACTOR}@users.noreply.github.com`,
])
).stdout
);
// tell git who we are
await execa("git", [
"config",
"--global",
"user.name",
process.env.GITHUB_ACTOR,
]);

await execa("git", [
"config",
"--global",
"user.email",
`${process.env.GITHUB_ACTOR}@users.noreply.github.com`,
]);

// add, commit and push it
await execa("git", ["add", "./package.json"]);
await execa("git", [
"commit",
"-m",
`[chore] published version ${newVersion}`,
]);
await execa("git", ["push"]);
console.log("Success!");
})();

async function getPackageTags(name) {
Expand Down

0 comments on commit 4917d32

Please sign in to comment.