File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99permissions :
1010 contents : write
11+ issues : write
12+ pull-requests : write
1113
1214jobs :
13- goreleaser :
15+ release :
1416 runs-on : ubuntu-latest
1517 steps :
1618 - name : Checkout
1719 uses : actions/checkout@v4
1820 with :
1921 fetch-depth : 0
2022
23+ - name : Set up Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : " lts/*"
27+
2128 - name : Set up Go
2229 uses : actions/setup-go@v4
2330 with :
2431 go-version : " 1.21"
2532
26- - name : Auto-tag
27- run : |
28- latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
29- version=${latest_tag#v}
30- IFS='.' read -r major minor patch <<< "$version"
31- feat_count=$(git log "$latest_tag"..HEAD --oneline --grep='^feat[(:]' | wc -l)
32- if [ "$feat_count" -gt 0 ]; then
33- minor=$((minor + 1))
34- patch=0
35- else
36- patch=$((patch + 1))
37- fi
38- new_tag="v$major.$minor.$patch"
39- echo "Creating tag $new_tag"
40- git tag "$new_tag"
41- git push origin "$new_tag"
42-
43- - name : Run GoReleaser
33+ - name : Install GoReleaser
4434 uses : goreleaser/goreleaser-action@v6
4535 with :
4636 distribution : goreleaser
4737 version : " ~> v2"
48- args : release --clean
38+ install-only : true
39+
40+ - name : Run semantic-release
41+ run : npx semantic-release
4942 env :
5043 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ {
2+ "branches": ["main"],
3+ "plugins": [
4+ "@semantic-release/commit-analyzer",
5+ "@semantic-release/release-notes-generator",
6+ "@semantic-release/git",
7+ ["@semantic-release/exec", {
8+ "publishCmd": "echo \"${nextRelease.notes}\" > /tmp/release-notes.md && goreleaser release --clean --release-notes /tmp/release-notes.md"
9+ }]
10+ ]
11+ }
You can’t perform that action at this time.
0 commit comments