Skip to content

Commit f0a62f0

Browse files
authored
Merge pull request #20 from opf/ci-adjust
CI adjustments because things did not work out first try
2 parents 6bd48e4 + ec4abc1 commit f0a62f0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Release
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
67
- 'v*.*.*'

.github/workflows/tag-version.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
fetch-depth: 0 # fetch all tags
1919

2020
- name: Tag and push if new version
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2123
run: |
2224
VERSION=$(jq -r .version package.json)
2325
TAG="v$VERSION"
2426
if git rev-parse "$TAG" >/dev/null 2>&1; then
2527
echo "Tag $TAG already exists. No action taken."
2628
else
27-
git config user.name "github-actions[bot]"
28-
git config user.email "github-actions[bot]@users.noreply.github.com"
29-
git tag "$TAG"
30-
git push origin "$TAG"
31-
echo "Tag $TAG created and pushed."
29+
gh auth login --with-token < <(echo "$GH_TOKEN")
30+
gh api repos/${GITHUB_REPOSITORY}/git/refs -f ref="refs/tags/$TAG" -f sha="$(git rev-parse HEAD)"
31+
echo "Tag $TAG created via GitHub API."
3232
fi

0 commit comments

Comments
 (0)