Skip to content

Commit

Permalink
fix: remote git repo fix to have push permission
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Nov 28, 2023
1 parent 797cbaf commit 1004e78
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ async function run() {
// Setting up Git
await runInWorkspace('git', ['config', 'user.name', `"${process.env.GITHUB_USER || 'Dart Conventional Release'}"`])
await runInWorkspace('git', ['config', 'user.email', `"${process.env.GITHUB_EMAIL || '[email protected]'}"`])
const remoteGitRepoUrl = `https://${githubToken}:[email protected]/${process.env.GITHUB_REPOSITORY}.git`
await runInWorkspace('git', ['remote', 'set-url', 'origin', remoteGitRepoUrl])


// Committing changes
await runInWorkspace('git', ['add', 'pubspec.yaml'])
Expand All @@ -84,8 +81,9 @@ async function run() {
await runInWorkspace('git', ['tag', tag])

// Pushing changes
await runInWorkspace('git', ['push', 'origin'])
await runInWorkspace('git', ['push', 'origin', '--tags'])
const remoteGitRepoUrl = `https://${githubToken}:[email protected]/${process.env.GITHUB_REPOSITORY}.git`
await runInWorkspace('git', ['push', remoteGitRepoUrl])
await runInWorkspace('git', ['push', remoteGitRepoUrl, '--tags'])
await uploadDartProject()
} catch (error) {
core.setFailed(`Action failed with error: ${error}`)
Expand Down

0 comments on commit 1004e78

Please sign in to comment.