Skip to content

Commit

Permalink
Use script instead of run
Browse files Browse the repository at this point in the history
  • Loading branch information
mukulmishra18 committed Dec 28, 2023
1 parent 3719aa1 commit a96bd78
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,21 @@ jobs:
fs.writeFileSync('./CHANGELOG.md', changelogFileContents, 'utf-8');
- name: Push changes
uses: actions/github-script@v6
with:
# Running a task with github token will not trigger a new workflow run
token: ${{ secrets.GH_TOKEN }}
script: |
const { execSync } = require('child_process');
const fullReleaseVersion = ${{ fromJson(steps.define-release-version.outputs.result).full }};
const { github } = require('@actions/github');
const octokit = github.getOctokit('${{ secrets.GH_TOKEN }}');
core.info(`Pushing changes to branch`);
execSync(`git add .`);
execSync(`git commit -m "Bump version ${fullReleaseVersion} and update changelog"`);
execSync(`git push origin feature/test-automated-release`);
run: |
git add .
git commit -m "Bump version ${{ fromJson(steps.define-release-version.outputs.result).full }} and update changelog"
Expand All @@ -72,7 +84,7 @@ jobs:
with:
script: |
const { execSync } = require('child_process');
const { fullReleaseVersion } = ${{ fromJson(steps.define-release-version.outputs.result).full }}
const fullReleaseVersion = ${{ fromJson(steps.define-release-version.outputs.result).full }}
const tag = `v${fullReleaseVersion}`;
const message = `Release ${fullReleaseVersion}`;
Expand Down

0 comments on commit a96bd78

Please sign in to comment.