-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ba74a2
commit 2294e52
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,17 @@ const workspace = process.env.GITHUB_WORKSPACE | |
console.log(`Current workspace: ${workspace}`) | ||
|
||
// Github Token | ||
// const githubToken = process.env.GITHUB_TOKEN | ||
// if (githubToken == null || githubToken == "") { | ||
// core.setFailed('GITHUB_TOKEN not found.') | ||
// return | ||
// } | ||
const githubToken = core.getInput('github-token') | ||
if (githubToken == null || githubToken == "") { | ||
core.setFailed('github-token not found as input.') | ||
return | ||
} | ||
// Github Username | ||
const githubUsername = core.getInput('github-username') | ||
if (githubUsername == null || githubUsername == "") { | ||
core.setFailed('github-username not found as input.') | ||
return | ||
} | ||
|
||
// ===================================================================== | ||
// ================================ RUN ================================ | ||
|
@@ -80,10 +86,8 @@ async function run() { | |
await runInWorkspace('git', ['tag', tag]) | ||
|
||
// Pushing changes | ||
// const remoteGitRepoUrl = `https://${githubToken}:[email protected]/${process.env.GITHUB_REPOSITORY}.git` | ||
// await runInWorkspace('git', ['push', remoteGitRepoUrl]) | ||
const remoteGitRepoUrl = `https://${githubUsername}:${githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git` | ||
await runInWorkspace('git', ['push']) | ||
// await runInWorkspace('git', ['push', remoteGitRepoUrl, '--tags']) | ||
await runInWorkspace('git', ['push', '--tags']) | ||
|
||
} catch (error) { | ||
|