@@ -23,30 +23,45 @@ jobs:
23
23
ruby-version : 3.1
24
24
bundler-cache : true
25
25
26
+ - name : Configure git
27
+ run : |
28
+ git config --local user.email "actions@github.com"
29
+ git config --local user.name "Actions Auto Build"
30
+
26
31
- name : Get current version
27
32
id : version-label
28
33
run : |
29
34
VERSION=$(grep VERSION lib/tailwind_merge/version.rb | head -n 1 | cut -d'"' -f2)
30
35
echo "version=${VERSION}" >> $GITHUB_OUTPUT
31
36
32
- # https://github.com/avakar/tag-and-release/pull/7
33
- - uses : filfreire/tag-and-release@abaaad001eaf803fddce149bb0cc09aef080773f
34
- with :
35
- tag_name : ${{ steps.version-label.outputs.version }}
36
- env :
37
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
+ - name : Create tag
38
+ run : |
39
+ git tag -a v${{ steps.version-label.outputs.version }} -m "Release v${{ steps.version-label.outputs.version }}"
40
+ git push origin --tags
38
41
39
- - name : Generate changelog
40
- run : script/generate_changelog
42
+ - name : Generate CHANGELOG.md
43
+ id : releasenotes
44
+ run : |
45
+ gh api repos/$GITHUB_REPOSITORY/releases/generate-notes \
46
+ -f tag_name="v${{ steps.version-label.outputs.version }}" \
47
+ -q .body > CHANGELOG.md
48
+ echo -e "\n\n" >> CHANGELOG.md
49
+ git log $(git describe --tags --abbrev=0)..HEAD --oneline >> CHANGELOG.md
41
50
42
51
- name : Commit & Push Changelog
43
52
run : |
44
53
git config --local user.email "actions@github.com"
45
54
git config --local user.name "Actions Auto Build"
46
- git add -f static
55
+ git add -f CHANGELOG.md
47
56
git commit -m "docs: update changelog" || true
48
57
git push
49
58
59
+ - name : Publish release
60
+ env :
61
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
+ run : |
63
+ gh release create v${{ steps.version-label.outputs.version }} --generate-notes
64
+
50
65
- name : Publish to RubyGems
51
66
run : |
52
67
mkdir -p $HOME/.gem
0 commit comments