Skip to content

Commit

Permalink
Push tag with git rather than github-script
Browse files Browse the repository at this point in the history
  • Loading branch information
AJGranowski committed Sep 29, 2024
1 parent eba0884 commit 2eac23a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ jobs:
- name: Get Latest Release Tag
run: echo "LATEST_RELEASE_TAG=$(git tag --list --sort=-v:refname release-* | head -1)" >> $GITHUB_ENV

- name: Tag Release
- name: Increment Tag
id: increment-tag
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
LATEST_RELEASE_TAG: ${{ env.LATEST_RELEASE_TAG }}
Expand All @@ -174,15 +175,17 @@ jobs:
const incrementReleaseTag = latestReleaseTag.replace(/(\d+)([^\.]*)$/, (_, x, y) => (Number(x) + 1) + y);
if (incrementReleaseTag.length >= latestReleaseTag.length && latestReleaseTag !== incrementReleaseTag) {
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${incrementReleaseTag}`,
sha: context.sha
});
return incrementReleaseTag;
}
}
- name: Tag Release
env:
NEW_RELEASE_TAG: ${{ steps.increment-tag.outputs.result }}
run: |
git tag "$NEW_RELEASE_TAG"
git push origin tag "$NEW_RELEASE_TAG"
cd:
name: Continuous Deployment
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion make-release
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
set -euC;
#test2
#test3

RELEASE_DIR="release/";

Expand Down

0 comments on commit 2eac23a

Please sign in to comment.