@@ -9,15 +9,59 @@ permissions:
99 contents : write
1010
1111jobs :
12+ verify :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v6
17+
18+ - name : Setup Ruby
19+ uses : ruby/setup-ruby@v1
20+ with :
21+ ruby-version : ' 3.4'
22+
23+ - name : Ruby syntax check
24+ run : ruby -c src/check_coverage.rb
25+
26+ - name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v3
28+
29+ - name : Build Docker image
30+ uses : docker/build-push-action@v7
31+ with :
32+ context : .
33+ push : false
34+ tags : simplecov-github-action:release-verify
35+ cache-from : type=gha
36+ cache-to : type=gha,mode=max
37+
1238 release :
39+ needs : verify
1340 runs-on : ubuntu-latest
1441 steps :
1542 - name : Checkout code
16- uses : actions/checkout@v4
43+ uses : actions/checkout@v6
44+ with :
45+ fetch-depth : 0
1746
1847 - name : Create Release
1948 id : create_release
20- uses : softprops/action-gh-release@v2
49+ uses : softprops/action-gh-release@v3
2150 with :
2251 draft : false
2352 prerelease : false
53+ generate_release_notes : true
54+
55+ - name : Update major version tag
56+ env :
57+ REF_NAME : ${{ github.ref_name }}
58+ run : |
59+ MAJOR="${REF_NAME%%.*}"
60+ if [[ ! "$MAJOR" =~ ^v[0-9]+$ ]]; then
61+ echo "Tag '$REF_NAME' does not match vX.Y.Z; skipping major tag move."
62+ exit 0
63+ fi
64+ git config user.name "github-actions[bot]"
65+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
66+ git tag -f "$MAJOR" "$REF_NAME"
67+ git push origin "$MAJOR" --force
0 commit comments