Skip to content

Commit 6e63c3c

Browse files
committed
Add: configure Git for tagging with authentication in work-jar.yml
1 parent 045b343 commit 6e63c3c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/work-jar.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
steps:
1010
- name: Checkout code
1111
uses: actions/checkout@v4
12+
with:
13+
token: ${{ secrets.GITHUB_TOKEN }}
1214

1315
- name: Set up JDK 17
1416
uses: actions/setup-java@v4
@@ -42,10 +44,14 @@ jobs:
4244
folder: build/repo
4345
target-folder: connectorapi/jar
4446

45-
- name: Create Git tag
47+
- name: Configure Git for tagging
4648
run: |
4749
git config --local user.email "action@github.com"
4850
git config --local user.name "GitHub Action"
51+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
52+
53+
- name: Create and push Git tag
54+
run: |
4955
git tag -a "${{ steps.extract_version.outputs.version }}" -m "Release version ${{ steps.extract_version.outputs.version }}"
5056
git push origin "${{ steps.extract_version.outputs.version }}"
5157
env:

0 commit comments

Comments
 (0)