@@ -40,15 +40,17 @@ jobs:
4040 - name : Bump Gem version
4141 run : |
4242 git switch -c "release/${RELEASE_TAG}"
43+ bundle install
4344 bundle exec gem bump -v "${RELEASE_TAG}"
44- git push origin
45+ git push -f --set-upstream origin "release/${RELEASE_TAG}"
4546 env :
4647 RELEASE_TAG : ${{ github.event.inputs.tag }}
4748
4849 - name : Create PR
4950 uses : actions/github-script@v5
5051 env :
5152 RELEASE_TAG : ${{ github.event.inputs.tag }}
53+ BASE : ${{ github.event.ref }}
5254 with :
5355 github-token : ${{ steps.get_token.outputs.token }}
5456 script : |
5860 tag_name: process.env.RELEASE_TAG,
5961 });
6062 const today = new Date().toJSON().slice(0, 10);
61- const header = [`# Changelog \n\n## ${process.env.RELEASE_TAG} / ${today}\n`];
63+ const header = [`# CHANGELOG \n\n## ${process.env.RELEASE_TAG} / ${today}\n`];
6264 const changes = header.concat(notes.body.split("\n").slice(3));
6365 const { data: content } = await github.rest.repos.getContent({
6466 owner: context.repo.owner,
7476 repo: context.repo.repo,
7577 ref: `heads/release/${process.env.RELEASE_TAG}`,
7678 });
77- await github.rest.git.createRef({
78- owner: context.repo.owner,
79- repo: context.repo.repo,
80- ref: `refs/heads/release/${process.env.RELEASE_TAG}`,
81- sha: head.object.sha,
82- });
8379 const { data: commit } = await github.rest.repos.createOrUpdateFileContents({
8480 owner: context.repo.owner,
8581 repo: context.repo.repo,
9389 owner: context.repo.owner,
9490 repo: context.repo.repo,
9591 head: `release/${process.env.RELEASE_TAG}`,
96- base: "master" ,
92+ base: process.env.BASE ,
9793 title: `Release ${process.env.RELEASE_TAG}`,
9894 body: "Update CHANGELOG",
9995 });
0 commit comments