Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
645d755
docs: lock Go v2 rewrite contract
ardasevinc Jul 15, 2026
c633922
docs: inventory v1 parity gates
ardasevinc Jul 15, 2026
7b7f304
build: scaffold Go v2 command
ardasevinc Jul 15, 2026
7686dac
test: add cross-runtime conformance harness
ardasevinc Jul 16, 2026
d6cd131
feat: add v2 machine schema registry
ardasevinc Jul 16, 2026
8c1ab7b
feat: port config and URL policy
ardasevinc Jul 16, 2026
cffe4b3
feat: port credential masking and terminal sanitization
ardasevinc Jul 16, 2026
39f55ad
feat: port heuristic secret redaction
ardasevinc Jul 16, 2026
d67067c
feat: add bounded Mattermost transport
ardasevinc Jul 16, 2026
891634b
docs: define v2 redaction and JSON offsets
ardasevinc Jul 16, 2026
2f3c435
feat: add unauthenticated health reads
ardasevinc Jul 16, 2026
b5fee31
fix: sanitize all CLI errors
ardasevinc Jul 16, 2026
64286f4
feat: port validated user identity reads
ardasevinc Jul 16, 2026
11cd36c
fix: classify CLI error write failures
ardasevinc Jul 16, 2026
154f4a7
feat: port bounded readiness diagnostics
ardasevinc Jul 16, 2026
b4813bf
feat: port validated team and channel reads
ardasevinc Jul 16, 2026
924fcea
feat: port bounded channel history reads
ardasevinc Jul 16, 2026
eb2d7c0
feat: port strict history cursors
ardasevinc Jul 16, 2026
a2827a2
feat: port bounded thread hydration
ardasevinc Jul 16, 2026
73f0ac4
feat: port bounded message search
ardasevinc Jul 16, 2026
012403e
feat: add deterministic output model
ardasevinc Jul 16, 2026
170435a
feat: port bounded mention retrieval
ardasevinc Jul 16, 2026
8237b23
feat: port terminal message rendering
ardasevinc Jul 16, 2026
ab4eb5d
feat: port safe Markdown rendering
ardasevinc Jul 16, 2026
b593f1e
feat: retain validated post presentation data
ardasevinc Jul 16, 2026
56c7d21
feat: add strict read machine contracts
ardasevinc Jul 16, 2026
15f65aa
feat: normalize rich post presentation
ardasevinc Jul 16, 2026
c3461d1
feat: convert read output to machine envelopes
ardasevinc Jul 16, 2026
ae0287e
feat: add secure CLI runtime foundation
ardasevinc Jul 16, 2026
c124b82
feat: port channel read command
ardasevinc Jul 16, 2026
b3fb799
feat: port thread read command
ardasevinc Jul 16, 2026
73af149
feat: port search read command
ardasevinc Jul 16, 2026
2838d1f
feat: port mentions read command
ardasevinc Jul 16, 2026
2faee2b
feat: port direct-message read command
ardasevinc Jul 16, 2026
7e8474d
feat: port group direct-message read command
ardasevinc Jul 16, 2026
2d932d8
feat: add secure config command
ardasevinc Jul 16, 2026
56f0896
fix: align identity list service models
ardasevinc Jul 16, 2026
b6726b3
docs: refresh Go parity status
ardasevinc Jul 16, 2026
82991cb
feat: add unread membership model
ardasevinc Jul 16, 2026
c9c99bc
feat: add doctor command
ardasevinc Jul 16, 2026
d65fc48
feat: add identity list schemas
ardasevinc Jul 16, 2026
81bb31c
feat: add bounded unread retrieval
ardasevinc Jul 16, 2026
c2d8beb
feat: add identity list output models
ardasevinc Jul 16, 2026
d8f73dc
feat: add identity list commands
ardasevinc Jul 16, 2026
9e85d0d
feat: add unread output contracts
ardasevinc Jul 16, 2026
bcf26a3
feat: add unread command
ardasevinc Jul 16, 2026
a65de9d
feat: add watch protocol foundation
ardasevinc Jul 16, 2026
8a56be2
feat: add watch command
ardasevinc Jul 16, 2026
160c72b
feat: add secure stage store foundation
ardasevinc Jul 16, 2026
172fa55
feat: add bounded message input
ardasevinc Jul 16, 2026
146575d
fix: align message input oracle
ardasevinc Jul 16, 2026
4d94e5b
feat: add offline stage lifecycle
ardasevinc Jul 16, 2026
fd17ed3
feat: add stage store inspection
ardasevinc Jul 16, 2026
cc5669d
feat: add mutation target reads
ardasevinc Jul 16, 2026
4b1d186
feat: add secure attachment binding
ardasevinc Jul 16, 2026
c5bab45
feat: add public stage contracts
ardasevinc Jul 16, 2026
8cc8121
feat: add target-bound stage creation
ardasevinc Jul 16, 2026
cff14d5
docs: lock post mutation bindings
ardasevinc Jul 16, 2026
0896b3a
refactor: split staging service boundaries
ardasevinc Jul 16, 2026
4548bfe
feat: bind post mutation state
ardasevinc Jul 16, 2026
103a6d3
fix: align stage emoji input
ardasevinc Jul 16, 2026
fbca8c7
feat: add strict post mutation reads
ardasevinc Jul 16, 2026
befc328
feat: add replay-safe post staging
ardasevinc Jul 16, 2026
441a84c
feat: harden stage lifecycle storage
ardasevinc Jul 17, 2026
18f3bc0
feat: add strict stage request decoding
ardasevinc Jul 17, 2026
6941607
feat: add public stage documents
ardasevinc Jul 17, 2026
cb22df0
feat: add secure stage content acquisition
ardasevinc Jul 17, 2026
20820f1
feat: add stage inspection commands
ardasevinc Jul 17, 2026
e4fea85
feat: add public post staging commands
ardasevinc Jul 17, 2026
dea4079
feat: add stage revision management
ardasevinc Jul 17, 2026
ad43b23
feat: add conversation creation staging
ardasevinc Jul 17, 2026
3434161
fix: rebuild plans for attachment revisions
ardasevinc Jul 17, 2026
ad5144a
feat: add durable apply journal
ardasevinc Jul 17, 2026
cbd3c36
feat: define public apply contracts
ardasevinc Jul 17, 2026
a46df29
feat: add prepared mutation transport
ardasevinc Jul 17, 2026
a38bb74
fix: align delete receipts with Mattermost
ardasevinc Jul 17, 2026
1130379
feat: add prepared post mutations
ardasevinc Jul 17, 2026
6c01eb9
feat: add prepared reaction mutations
ardasevinc Jul 17, 2026
5331622
fix: enforce Mattermost group limits
ardasevinc Jul 17, 2026
d3617b7
test: cover Mattermost group limits
ardasevinc Jul 17, 2026
dbbd6f8
feat: add prepared conversation mutations
ardasevinc Jul 17, 2026
e9a065b
fix: verify live group membership
ardasevinc Jul 17, 2026
69c1d71
fix: verify live direct membership
ardasevinc Jul 17, 2026
1825e15
feat: execute conversation apply plans
ardasevinc Jul 17, 2026
0673402
fix: canonicalize staged reaction names
ardasevinc Jul 17, 2026
788b4ee
feat: execute reaction apply plans
ardasevinc Jul 17, 2026
a5d1971
feat: execute post apply plans
ardasevinc Jul 17, 2026
63c8d44
feat: execute attachment apply plans
ardasevinc Jul 17, 2026
001c20e
feat: resume partial attachment plans
ardasevinc Jul 17, 2026
bf0d34d
feat: expose durable apply command
ardasevinc Jul 17, 2026
199e39b
test: add Go Docker mutation acceptance
ardasevinc Jul 17, 2026
45fe96f
test: harden Docker mutation acceptance
ardasevinc Jul 17, 2026
2a542f0
test: verify live conversation creation
ardasevinc Jul 17, 2026
50f780a
test: verify live post lifecycle
ardasevinc Jul 17, 2026
fa6cfa1
test: prove apply journal crash recovery
ardasevinc Jul 17, 2026
fea6af9
test: verify live unknown outcome recovery
ardasevinc Jul 17, 2026
a39cdca
test: verify concurrent apply exclusion
ardasevinc Jul 17, 2026
09fe69c
test: verify live read workflows
ardasevinc Jul 17, 2026
45df971
test: verify live watch events
ardasevinc Jul 17, 2026
804514e
docs: lock retention lifecycle contract
ardasevinc Jul 17, 2026
4797816
feat: add audited stage retention lifecycle
ardasevinc Jul 17, 2026
944c940
test: add paired differential conformance corpus
ardasevinc Jul 17, 2026
b274fd4
fix: reject writable retention configuration
ardasevinc Jul 17, 2026
53b3a19
build: add reproducible native distribution
ardasevinc Jul 17, 2026
8bab033
build: add native npm package launcher
ardasevinc Jul 17, 2026
6499d03
ci: add native release provenance pipeline
ardasevinc Jul 17, 2026
02100f1
ci: publish native npm packages with oidc
ardasevinc Jul 17, 2026
e9afe36
build: adopt Go v2 module path
ardasevinc Jul 17, 2026
ac440d8
fix: stop single conformance runs after success
ardasevinc Jul 17, 2026
efd432a
ci: enforce Go static and dependency audits
ardasevinc Jul 17, 2026
48be4b1
test: replace Docker harness with Go runner
ardasevinc Jul 17, 2026
329209b
docs: close TypeScript removal ledger
ardasevinc Jul 17, 2026
f8bdaf7
refactor: remove TypeScript implementation
ardasevinc Jul 17, 2026
3d3072b
docs: document native Go v2
ardasevinc Jul 17, 2026
f786fce
ci: fail closed before release publication
ardasevinc Jul 17, 2026
58cbe4a
ci: decouple Homebrew tap publication
ardasevinc Jul 17, 2026
b1a5f06
test: isolate XDG paths in CLI tests
ardasevinc Jul 17, 2026
7286583
ci: pack generated npm directories explicitly
ardasevinc Jul 17, 2026
3a004c8
fix: check dependency licenses across release targets
ardasevinc Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 49 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,61 @@ permissions:
contents: read

jobs:
verify:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
bun-version: 1.3.14
go-version-file: go.mod
cache: true
- run: go test ./...
- run: go test -race ./...
- run: go vet ./...
- run: go run honnef.co/go/tools/cmd/staticcheck@2026.1 ./...
- run: go run golang.org/x/vuln/cmd/govulncheck@v1.6.0 ./...
- run: go run ./scripts/licenses
- run: go mod verify
- run: go build -o "$RUNNER_TEMP/mm" ./cmd/mm
- run: git diff --check

distribution:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- run: bun install --frozen-lockfile
- run: bun run verify
- run: bun audit
- name: Pack and verify contents
id: pack
shell: bash
node-version: 24
- name: Build release artifacts reproducibly
run: |
tarball=$(npm pack --json --ignore-scripts | node -e 'let input=""; process.stdin.on("data", c => input += c); process.stdin.on("end", () => process.stdout.write(JSON.parse(input)[0].filename))')
printf 'tarball=%s\n' "$tarball" >> "$GITHUB_OUTPUT"
actual=$(tar -tzf "$tarball" | LC_ALL=C sort)
expected=$(printf '%s\n' package/LICENSE package/README.md package/dist/index.js package/package.json | LC_ALL=C sort)
diff -u <(printf '%s\n' "$expected") <(printf '%s\n' "$actual")
- name: Smoke packed CLI on Node 22
go run ./scripts/release --version 2.0.0-dev --commit "$GITHUB_SHA" --output dist
GOCACHE="$RUNNER_TEMP/repro-cache" go run ./scripts/release --version 2.0.0-dev --commit "$GITHUB_SHA" --output repro
diff -r dist repro
(cd dist && sha256sum --check checksums.txt)
ruby -c dist/mattermost-cli.rb
- name: Generate and pack exact npm packages
shell: bash
run: |
mkdir package-smoke
tar -xzf "${{ steps.pack.outputs.tarball }}" -C package-smoke
test "$(node package-smoke/package/dist/index.js --version)" = "$(node -p "require('./package.json').version")"
node package-smoke/package/dist/index.js --help
node package-smoke/package/dist/index.js config --path
- name: Smoke global npm install
go run ./scripts/npm-package --version 2.0.0-dev --release-dir dist --output npm-dist
mkdir npm-packs
for package_dir in npm-dist/*; do
npm pack --json --ignore-scripts --pack-destination npm-packs "./$package_dir" >/dev/null
done
test "$(find npm-packs -maxdepth 1 -name '*.tgz' | wc -l)" -eq 5
- name: Smoke native archive and npm launcher
run: |
npm install --global --prefix "$RUNNER_TEMP/npm-global" "./${{ steps.pack.outputs.tarball }}"
test "$("$RUNNER_TEMP/npm-global/bin/mm" --version)" = "$(node -p "require('./package.json').version")"
"$RUNNER_TEMP/npm-global/bin/mm" --help
mkdir "$RUNNER_TEMP/native-smoke"
tar -xzf dist/mattermost-cli_2.0.0-dev_linux_amd64.tar.gz -C "$RUNNER_TEMP/native-smoke"
test "$("$RUNNER_TEMP/native-smoke/mm" --version)" = "mm version 2.0.0-dev ($GITHUB_SHA)"
mkdir "$RUNNER_TEMP/npm-smoke"
cd "$RUNNER_TEMP/npm-smoke"
npm init -y >/dev/null
npm install --ignore-scripts \
"$GITHUB_WORKSPACE/npm-packs/ardasevinc-mattermost-cli-linux-amd64-2.0.0-dev.tgz" \
"$GITHUB_WORKSPACE/npm-packs/mattermost-cli-2.0.0-dev.tgz" >/dev/null
test "$(./node_modules/.bin/mm --version)" = "mm version 2.0.0-dev ($GITHUB_SHA)"
./node_modules/.bin/mm --help
118 changes: 90 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: Publish npm packages

on:
release:
Expand All @@ -7,49 +7,111 @@ on:
permissions:
contents: read
id-token: write
attestations: read

concurrency:
group: npm-${{ github.event.release.tag_name }}
cancel-in-progress: false

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 20
environment: npm
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.release.tag_name }}
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
bun-version: 1.3.14
go-version-file: go.mod
cache: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
registry-url: https://registry.npmjs.org
- run: bun install --frozen-lockfile
- run: bun audit
- run: bun run verify
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
- name: Require an unpublished npm version
- name: Validate release identity
id: version
shell: bash
run: |
name=$(node -p "require('./package.json').name")
version=$(node -p "require('./package.json').version")
versions=$(npm view "$name" versions --json)
node -e 'const versions = JSON.parse(process.argv[1]); if (versions.includes(process.argv[2])) { throw new Error("npm version " + process.argv[2] + " is already published") }' "$versions" "$version"
- name: Pack and smoke exact tarball
id: pack
version="${{ github.event.release.tag_name }}"
version="${version#v}"
test "${{ github.event.release.tag_name }}" = "v$version"
source_version="$(awk -F'"' '/^[[:space:]]*Version = / {print $2}' internal/buildinfo/buildinfo.go)"
test "$version" = "$source_version"
commit="$(git rev-parse HEAD)"
test "$commit" = "$(git rev-parse '${{ github.event.release.tag_name }}^{commit}')"
printf 'version=%s\n' "$version" >> "$GITHUB_OUTPUT"
printf 'commit=%s\n' "$commit" >> "$GITHUB_OUTPUT"
- name: Download and verify native release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir dist
gh release download "${{ github.event.release.tag_name }}" --dir dist
(cd dist && sha256sum --check checksums.txt)
for artifact in dist/*; do
gh attestation verify "$artifact" --repo "$GITHUB_REPOSITORY"
done
- name: Generate and pack npm packages
shell: bash
run: |
tarball=$(npm pack --json --ignore-scripts | node -e 'let input=""; process.stdin.on("data", c => input += c); process.stdin.on("end", () => process.stdout.write(JSON.parse(input)[0].filename))')
printf 'tarball=%s\n' "$tarball" >> "$GITHUB_OUTPUT"
actual=$(tar -tzf "$tarball" | LC_ALL=C sort)
expected=$(printf '%s\n' package/LICENSE package/README.md package/dist/index.js package/package.json | LC_ALL=C sort)
go run ./scripts/npm-package --version "${{ steps.version.outputs.version }}" --release-dir dist --output npm-dist
mkdir npm-packs
for package_dir in npm-dist/*; do
npm pack --json --ignore-scripts --pack-destination npm-packs "./$package_dir" >/dev/null
done
test "$(find npm-packs -maxdepth 1 -name '*.tgz' | wc -l)" -eq 5
for tarball in npm-packs/ardasevinc-*.tgz; do
actual="$(tar -tzf "$tarball" | LC_ALL=C sort)"
expected="$(printf '%s\n' package/bin/mm package/package.json | LC_ALL=C sort)"
diff -u <(printf '%s\n' "$expected") <(printf '%s\n' "$actual")
done
main="npm-packs/mattermost-cli-${{ steps.version.outputs.version }}.tgz"
actual="$(tar -tzf "$main" | LC_ALL=C sort)"
expected="$(printf '%s\n' package/LICENSE package/README.md package/bin/mm.js package/package.json | LC_ALL=C sort)"
diff -u <(printf '%s\n' "$expected") <(printf '%s\n' "$actual")
mkdir package-smoke
tar -xzf "$tarball" -C package-smoke
test "$(node package-smoke/package/dist/index.js --version)" = "$(node -p "require('./package.json').version")"
node package-smoke/package/dist/index.js --help
node package-smoke/package/dist/index.js config --path
npm install --global --prefix "$RUNNER_TEMP/npm-global" "./$tarball"
test "$("$RUNNER_TEMP/npm-global/bin/mm" --version)" = "$(node -p "require('./package.json').version")"
"$RUNNER_TEMP/npm-global/bin/mm" --help
- run: npm publish "./${{ steps.pack.outputs.tarball }}" --access public --provenance
- name: Smoke exact Linux npm install
run: |
mkdir "$RUNNER_TEMP/npm-smoke"
cd "$RUNNER_TEMP/npm-smoke"
npm init -y >/dev/null
npm install --ignore-scripts \
"$GITHUB_WORKSPACE/npm-packs/ardasevinc-mattermost-cli-linux-amd64-${{ steps.version.outputs.version }}.tgz" \
"$GITHUB_WORKSPACE/npm-packs/mattermost-cli-${{ steps.version.outputs.version }}.tgz" >/dev/null
test "$(./node_modules/.bin/mm --version)" = "mm version ${{ steps.version.outputs.version }} (${{ steps.version.outputs.commit }})"
./node_modules/.bin/mm --help
- name: Preflight immutable npm versions
shell: bash
run: |
for tarball in npm-packs/*.tgz; do
name="$(tar -xOzf "$tarball" package/package.json | node -p 'JSON.parse(require("fs").readFileSync(0, "utf8")).name')"
version="${{ steps.version.outputs.version }}"
remote="$(npm view "$name@$version" dist.integrity --json 2>/dev/null || true)"
if [[ -n "$remote" ]]; then
remote="$(node -p 'JSON.parse(process.argv[1])' "$remote")"
local_integrity="sha512-$(openssl dgst -sha512 -binary "$tarball" | base64 -w 0)"
test "$remote" = "$local_integrity"
fi
done
- name: Publish native platform packages
shell: bash
run: |
for tarball in npm-packs/ardasevinc-*.tgz; do
name="$(tar -xOzf "$tarball" package/package.json | node -p 'JSON.parse(require("fs").readFileSync(0, "utf8")).name')"
if npm view "$name@${{ steps.version.outputs.version }}" version >/dev/null 2>&1; then
echo "already published identically: $name@${{ steps.version.outputs.version }}"
else
npm publish "$tarball" --access public --provenance
fi
done
- name: Publish launcher package last
shell: bash
run: |
tarball="npm-packs/mattermost-cli-${{ steps.version.outputs.version }}.tgz"
if npm view "mattermost-cli@${{ steps.version.outputs.version }}" version >/dev/null 2>&1; then
echo "already published identically: mattermost-cli@${{ steps.version.outputs.version }}"
else
npm publish "$tarball" --access public --provenance
fi
122 changes: 122 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
actions: read
contents: write
id-token: write
attestations: write
artifact-metadata: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
name: Reproducible native release
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
cache: true
- name: Validate tag and source version
id: version
shell: bash
run: |
version="${GITHUB_REF_NAME#v}"
test "$GITHUB_REF_NAME" = "v$version"
source_version="$(awk -F'"' '/^[[:space:]]*Version = / {print $2}' internal/buildinfo/buildinfo.go)"
test "$version" = "$source_version"
if [[ "$version" == *-* ]]; then prerelease=true; else prerelease=false; fi
printf 'version=%s\n' "$version" >> "$GITHUB_OUTPUT"
printf 'prerelease=%s\n' "$prerelease" >> "$GITHUB_OUTPUT"
- name: Require tagged commit on main
run: |
git fetch --no-tags origin main
git merge-base --is-ancestor "$GITHUB_SHA" origin/main
- name: Require successful CI for tagged commit
env:
GH_TOKEN: ${{ github.token }}
run: |
conclusion="$(gh api "repos/$GITHUB_REPOSITORY/actions/workflows/ci.yml/runs?head_sha=$GITHUB_SHA&status=completed" --jq '.workflow_runs | sort_by(.created_at) | last | .conclusion')"
test "$conclusion" = success
- name: Reject existing release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
echo "release $GITHUB_REF_NAME already exists" >&2
exit 1
fi
- name: Test release source
run: |
go mod download
go install honnef.co/go/tools/cmd/staticcheck@2026.1
go install golang.org/x/vuln/cmd/govulncheck@v1.6.0
GOPROXY=off go test -race -p 1 ./...
GOPROXY=off go vet ./...
GOPROXY=off staticcheck ./...
GOPROXY=off govulncheck ./...
GOPROXY=off go run ./scripts/licenses
- name: Build deterministic archives twice
env:
GOPROXY: "off"
run: |
GOCACHE="$RUNNER_TEMP/gocache-a" go run ./scripts/release --version "${{ steps.version.outputs.version }}" --commit "$GITHUB_SHA" --output dist
GOCACHE="$RUNNER_TEMP/gocache-b" go run ./scripts/release --version "${{ steps.version.outputs.version }}" --commit "$GITHUB_SHA" --output repro
diff -r dist repro
- name: Verify archives, checksums, formula, and Linux binary
run: |
cd dist
sha256sum --check checksums.txt
ruby -c mattermost-cli.rb
mkdir "$RUNNER_TEMP/mm-smoke"
tar -xzf "mattermost-cli_${{ steps.version.outputs.version }}_linux_amd64.tar.gz" -C "$RUNNER_TEMP/mm-smoke"
test "$("$RUNNER_TEMP/mm-smoke/mm" --version)" = "mm version ${{ steps.version.outputs.version }} ($GITHUB_SHA)"
"$RUNNER_TEMP/mm-smoke/mm" --help
"$RUNNER_TEMP/mm-smoke/mm" config --path
- name: Attest release artifacts
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
with:
subject-path: "dist/*"
- name: Verify release attestations
env:
GH_TOKEN: ${{ github.token }}
run: |
for artifact in dist/*; do
gh attestation verify "$artifact" --repo "$GITHUB_REPOSITORY"
done
- name: Create complete draft release
id: create_release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
with:
files: dist/*
fail_on_unmatched_files: true
generate_release_notes: true
draft: true
overwrite_files: false
prerelease: ${{ steps.version.outputs.prerelease }}
- name: Verify assets and publish release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_ID: ${{ steps.create_release.outputs.id }}
run: |
find dist -maxdepth 1 -type f -exec basename {} \; | sort > "$RUNNER_TEMP/expected-assets"
test -n "$RELEASE_ID"
gh api "repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID" --jq '.assets[].name' | sort > "$RUNNER_TEMP/actual-assets"
diff -u "$RUNNER_TEMP/expected-assets" "$RUNNER_TEMP/actual-assets"
if [[ "${{ steps.version.outputs.prerelease }}" == true ]]; then latest=false; else latest=true; fi
gh api --method PATCH "repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID" \
-F draft=false \
-F prerelease="${{ steps.version.outputs.prerelease }}" \
-f make_latest="$latest" >/dev/null
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# dependencies (bun install)
node_modules

# output
out
dist
npm-dist
bin
!npm/bin/
!npm/bin/mm.js
*.tgz
npm-dist

# code coverage
coverage
Expand All @@ -25,9 +27,7 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
.env.local

# caches
.eslintcache
.cache
*.tsbuildinfo

# IntelliJ based IDEs
.idea
Expand All @@ -43,6 +43,3 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Claude Code
.claude/

# Bun build artifacts
*.bun-build
Loading