Skip to content

Commit aa80fce

Browse files
authored
chore(release): prepare v2.0.3, simplify release process (#66)
* chore: bump version to 2.0.3 for release Signed-off-by: lelia <2418071+lelia@users.noreply.github.com> * docs: update documentation refs to v2.0.3 Signed-off-by: lelia <2418071+lelia@users.noreply.github.com> * ci: simplify publish workflow to comply with GitHub restrictions Signed-off-by: lelia <2418071+lelia@users.noreply.github.com> --------- Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
1 parent b3dc20e commit aa80fce

14 files changed

Lines changed: 106 additions & 129 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
- [ ] `socket_basics/version.py` updated to new version
2727
- [ ] `socket_basics/__init__.py` updated to the same version
2828
- [ ] `action.yml` `image:` ref updated to `docker://ghcr.io/socketdev/socket-basics:<new-version>`
29-
- [ ] `CHANGELOG.md` `[Unreleased]` section reviewed
29+
- [ ] `CHANGELOG.md` updated with human-authored release notes for this version

.github/workflows/_docker-pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ name: _docker-pipeline (reusable)
77
#
88
# Two modes:
99
# push: false → build + smoke test + integration test (main image only)
10-
# push: true → above + push to GHCR/Docker Hub + update floating v-tag
10+
# push: true → above + push exact version tags to GHCR/Docker Hub
1111
#
1212
# Permissions required from the calling workflow:
1313
# push: false → contents: read
14-
# push: true → contents: write, packages: write
14+
# push: true → contents: read, packages: write
1515

1616
on:
1717
workflow_call:
@@ -41,7 +41,7 @@ on:
4141
tag_push:
4242
description: >
4343
True when the caller was triggered by a tag push (e.g. v2.0.0).
44-
Controls the floating major-version tag update and the 'latest' Docker tag.
44+
Controls semver metadata-action tagging for exact release tags.
4545
Passed explicitly rather than relying on github.ref_type inside the callee,
4646
since context propagation in reusable workflows can be ambiguous.
4747
type: boolean

.github/workflows/publish-docker.yml

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -80,64 +80,26 @@ jobs:
8080
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
8181
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
8282

83-
# ── Job 3: Create GitHub release + update CHANGELOG ────────────────────────
83+
# ── Job 3: Create GitHub release ───────────────────────────────────────────
8484
# Runs once after the image is successfully pushed (not for workflow_dispatch
8585
# re-publishes — those don't create new releases).
86-
# Generates categorised release notes from merged PR labels (.github/release.yml),
87-
# creates the GitHub Release, then commits the CHANGELOG update back to main.
86+
# Generates categorised release notes from merged PR labels (.github/release.yml).
87+
# CHANGELOG updates are intentionally human-authored in the release PR so this
88+
# workflow never needs to push commits to the protected default branch.
8889
create-release:
8990
needs: [resolve-version, build-test-push]
9091
if: github.ref_type == 'tag'
9192
permissions:
92-
contents: write # create GitHub release + commit CHANGELOG back to main
93+
contents: write # create GitHub release
9394
runs-on: ubuntu-latest
94-
env:
95-
VERSION: ${{ needs.resolve-version.outputs.version }}
9695
steps:
97-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
98-
with:
99-
ref: main
100-
fetch-depth: 0
101-
persist-credentials: false
102-
103-
- name: 🤖 Generate socket-release-bot token
104-
id: bot
105-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
106-
with:
107-
app-id: ${{ secrets.GH_BOT_APP_ID }}
108-
private-key: ${{ secrets.GH_BOT_APP_PEM_FILE }}
109-
owner: SocketDev
110-
repositories: socket-basics
111-
11296
- name: 📝 Create GitHub release with auto-generated notes
11397
env:
114-
GH_TOKEN: ${{ steps.bot.outputs.token }}
98+
GH_TOKEN: ${{ github.token }}
11599
REF_NAME: ${{ github.ref_name }}
116100
run: |
117101
gh release create "$REF_NAME" \
118102
--title "$REF_NAME" \
119103
--generate-notes \
120104
--verify-tag \
121105
|| echo "Release already exists (re-run scenario) — skipping creation"
122-
123-
- name: 📋 Update CHANGELOG.md
124-
env:
125-
GH_TOKEN: ${{ steps.bot.outputs.token }}
126-
REF_NAME: ${{ github.ref_name }}
127-
run: |
128-
NOTES=$(gh release view "$REF_NAME" --json body --jq .body)
129-
DATE=$(date +%Y-%m-%d)
130-
echo "$NOTES" | python scripts/update_changelog.py \
131-
--version "$VERSION" \
132-
--date "$DATE"
133-
134-
- name: 🔀 Commit CHANGELOG back to main
135-
env:
136-
BOT_TOKEN: ${{ steps.bot.outputs.token }}
137-
run: |
138-
git config user.name "socket-release-bot[bot]"
139-
git config user.email "socket-release-bot[bot]@users.noreply.github.com"
140-
git remote set-url origin "https://x-access-token:${BOT_TOKEN}@github.com/SocketDev/socket-basics.git"
141-
git add CHANGELOG.md
142-
git diff --cached --quiet || git commit -m "chore: release ${github.ref_name} — update CHANGELOG [skip ci]"
143-
git push origin HEAD:main

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
88

99
## [Unreleased]
1010

11+
## [2.0.3] - 2026-04-24
12+
13+
<!-- Release notes generated using configuration in .github/release.yml at main -->
14+
15+
## What's Changed
16+
### 🔧 Other Changes
17+
* fix: Harden GHA workflows by @reberhardt7 in https://github.com/SocketDev/socket-basics/pull/58
18+
* docs: cleanup docs guidance, additional workflow hardening by @lelia in https://github.com/SocketDev/socket-basics/pull/60
19+
* fix(rules): improve precision of 4 high-FP dotnet opengrep rules by @dc-larsen in https://github.com/SocketDev/socket-basics/pull/63
20+
21+
## New Contributors
22+
* @reberhardt7 made their first contribution in https://github.com/SocketDev/socket-basics/pull/58
23+
24+
**Full Changelog**: https://github.com/SocketDev/socket-basics/compare/v2.0.2...v2.0.3
25+
1126
## [2.0.2] - 2026-03-23
1227

1328
<!-- Release notes generated using configuration in .github/release.yml at v2.0.2 -->

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Run Socket Basics
3636
# Pin to a commit SHA for supply-chain safety.
3737
# Dependabot will keep this up to date automatically — see docs/github-action.md.
38-
uses: SocketDev/socket-basics@<sha> # v2.0.2
38+
uses: SocketDev/socket-basics@<sha> # v2.0.3
3939
env:
4040
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
4141
with:
@@ -168,10 +168,10 @@ For GitHub Actions, see the [Quick Start](#-quick-start---github-actions) above
168168

169169
```bash
170170
# Pull the pre-built image (recommended — no build step required)
171-
docker pull ghcr.io/socketdev/socket-basics:2.0.2
171+
docker pull ghcr.io/socketdev/socket-basics:2.0.3
172172
173173
# Run scan
174-
docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:2.0.2 \
174+
docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:2.0.3 \
175175
--workspace /workspace \
176176
--python-sast-enabled \
177177
--secret-scanning-enabled \

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "Socket"
44

55
runs:
66
using: "docker"
7-
image: "docker://ghcr.io/socketdev/socket-basics:2.0.2"
7+
image: "docker://ghcr.io/socketdev/socket-basics:2.0.3"
88
env:
99
# Core GitHub variables (these are automatically available, but we explicitly pass GITHUB_TOKEN)
1010
GITHUB_TOKEN: ${{ inputs.github_token }}

0 commit comments

Comments
 (0)