Skip to content

Commit ea23326

Browse files
committed
pull request with git
1 parent 8f186cd commit ea23326

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

.github/workflows/contrib.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,19 @@ on:
2525
- "closed"
2626

2727
jobs:
28-
share_version:
28+
tag_with_version:
2929
if: ${{ github.event.pull_request.merged }}
3030
runs-on: ubuntu-latest
31-
outputs:
32-
version: "${{ steps.get_version.outputs.version }}"
3331
steps:
3432
- name: Checkout
3533
uses: actions/checkout@v4
36-
- name: Get Version
37-
id: get_version
34+
- name: Tag and Push Version
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3837
run: |
3938
version="v$(cat version.txt)"
4039
echo "Version: $version"
41-
# Set the version as an output
42-
echo "::set-output name=version::$version"
43-
push_tag:
44-
if: ${{ github.event.pull_request.merged }}
45-
runs-on: ubuntu-latest
46-
needs: read_version
47-
steps:
48-
- name: Tag commit
49-
uses: tvdias/github-tagger@v0.0.1
50-
with:
51-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
52-
tag: "${{ needs.share_version.outputs.version }}"
40+
git config user.name "GitHub Actions"
41+
git config user.email "actions@github.com"
42+
git tag -a "$version" -m "generated on pull request"
43+
git push origin "$version"

0 commit comments

Comments
 (0)