-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): create tag and merge commit manually (#382)
* feat(ci): create tag and merge commit manually * push tag too * trigger ci * DEPENDENCIES
- Loading branch information
1 parent
6830f80
commit 562c568
Showing
2 changed files
with
15 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,26 +23,24 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "eclipse-edc-bot" | ||
git config user.email "[email protected]" | ||
# create tag on the current branch using GitHub's own API | ||
- name: Create tag on current branch (main) | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/tags/v${{ env.EDC_VERSION }}', | ||
sha: context.sha | ||
}) | ||
run: | | ||
git tag v${{ env.EDC_VERSION }} | ||
git push origin tag v${{ env.EDC_VERSION }} | ||
# create merge commit main -> releases encoding the version in the commit message | ||
- name: Merge main -> releases | ||
uses: everlytic/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
source_ref: ${{ github.ref }} | ||
target_branch: 'releases' | ||
commit_message_template: 'Merge commit for release of version v${{ env.EDC_VERSION }}' | ||
run: | | ||
git fetch origin releases --unshallow | ||
git checkout --track origin/releases | ||
git merge main -m "Merge commit for release of version v${{ env.EDC_VERSION }}" | ||
git push origin releases | ||
outputs: | ||
edc-version: ${{ env.EDC_VERSION }} | ||
|
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