Skip to content

Commit 3177463

Browse files
committed
chore: Update ruby and actions versions
1 parent 03bfc6e commit 3177463

5 files changed

Lines changed: 83 additions & 7 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717

1818
- name: Set up Docker Buildx
1919
uses: docker/setup-buildx-action@v3
2020

2121
- name: Build Docker image
22-
uses: docker/build-push-action@v6
22+
uses: docker/build-push-action@v7
2323
with:
2424
context: .
2525
push: false

.github/workflows/release.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,59 @@ permissions:
99
contents: write
1010

1111
jobs:
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

.github/workflows/test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,31 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v6
18+
19+
- name: Setup Ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: '3.4'
23+
24+
- name: Ruby syntax check
25+
run: ruby -c src/check_coverage.rb
26+
1027
test-action:
1128
runs-on: ubuntu-latest
29+
needs: lint
1230
steps:
1331
- name: Checkout code
14-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
1533

16-
# Create a test SimpleCov file
1734
- name: Create test SimpleCov file
1835
run: |
1936
mkdir -p coverage

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.2] - 2026-05-17
9+
10+
### Changed
11+
- Upgraded Docker base image from `ruby:3.1-alpine` to `ruby:3.4-alpine`
12+
- Bumped `actions/checkout` to v6 across all workflows
13+
- Bumped `docker/build-push-action` to v7
14+
- Bumped `softprops/action-gh-release` to v3
15+
16+
### Added
17+
- Dedicated `lint` job in CI running a Ruby syntax check (`ruby -c`) before the action self-test
18+
- Pre-release `verify` job (Ruby syntax + Docker build) gating the `release` job
19+
- Automatic release notes generation (`generate_release_notes: true`)
20+
- Major version tag move (e.g. `v1` pointing at latest `v1.x.y`) on release
21+
- Explicit least-privilege `permissions: contents: read` on the test workflow
22+
823
## [1.0.1] - 2025-04-21
924

1025
### Added

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.1-alpine
1+
FROM ruby:3.4-alpine
22

33
LABEL maintainer="Aleks Remniov <alexander.remniov@gmail.com>"
44
LABEL org.opencontainers.image.source="https://github.com/alexremn/simplecov-github-action"

0 commit comments

Comments
 (0)