Skip to content

Commit

Permalink
test: releasing from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
strowk committed Dec 1, 2024
1 parent 348bd49 commit 742f6e3
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 21 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release mcp-k8s to npm

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.3'

- name: Install goreleaser
run: |
go install github.com/goreleaser/goreleaser/v2@latest
- name: Run goreleaser build
run: |
goreleaser build --clean
- name: Publish to npm
run: |
./packages/publish_npm.sh
2 changes: 1 addition & 1 deletion packages/npm-mcp-k8s-darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strowk/mcp-k8s-darwin-arm64",
"version": "0.0.9",
"version": "0.0.10",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/npm-mcp-k8s-darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strowk/mcp-k8s-darwin-x64",
"version": "0.0.9",
"version": "0.0.10",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/npm-mcp-k8s-linux-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strowk/mcp-k8s-linux-arm64",
"version": "0.0.9",
"version": "0.0.10",
"os": [
"linux",
"freebsd"
Expand Down
2 changes: 1 addition & 1 deletion packages/npm-mcp-k8s-linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strowk/mcp-k8s-linux-x64",
"version": "0.0.9",
"version": "0.0.10",
"os": [
"linux",
"freebsd"
Expand Down
2 changes: 1 addition & 1 deletion packages/npm-mcp-k8s-win32-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strowk/mcp-k8s-win32-arm64",
"version": "0.0.9",
"version": "0.0.10",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/npm-mcp-k8s-win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strowk/mcp-k8s-win32-x64",
"version": "0.0.9",
"version": "0.0.10",
"os": [
"win32"
],
Expand Down
14 changes: 7 additions & 7 deletions packages/npm-mcp-k8s/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@strowk/mcp-k8s",
"version": "0.0.9",
"version": "0.0.10",
"main": "./index.js",
"bin": {
"mcp-k8s": "bin/cli"
},
"optionalDependencies": {
"@strowk/mcp-k8s-darwin-x64": "0.0.9",
"@strowk/mcp-k8s-darwin-arm64": "0.0.9",
"@strowk/mcp-k8s-linux-x64": "0.0.9",
"@strowk/mcp-k8s-linux-arm64": "0.0.9",
"@strowk/mcp-k8s-win32-x64": "0.0.9",
"@strowk/mcp-k8s-win32-arm64": "0.0.9"
"@strowk/mcp-k8s-darwin-x64": "0.0.10",
"@strowk/mcp-k8s-darwin-arm64": "0.0.10",
"@strowk/mcp-k8s-linux-x64": "0.0.10",
"@strowk/mcp-k8s-linux-arm64": "0.0.10",
"@strowk/mcp-k8s-win32-x64": "0.0.10",
"@strowk/mcp-k8s-win32-arm64": "0.0.10"
},
"repository": {
"type": "git",
Expand Down
14 changes: 9 additions & 5 deletions packages/publish_npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

set -e

# replace previous version with new version in all .json files in ./packages folder
find ./packages -type f -name '*.json' -exec sed -i '' -e 's/0.0.9/0.0.10/g' {} \;

# find ./packages -type f -exec sed -i '' -e 's/0.0.2/0.0.3/g' {} \;

# Mac
cp dist/mcp-k8s-go_darwin_amd64_v1/mcp-k8s-go ./packages/npm-mcp-k8s-darwin-x64/bin/mcp-k8s-go
chmod +x ./packages/npm-mcp-k8s-darwin-x64/bin/mcp-k8s-go
cp dist/mcp-k8s-go_darwin_arm64_v8.0/mcp-k8s-go ./packages/npm-mcp-k8s-darwin-arm64/bin/mcp-k8s-go
chmod +x ./packages/npm-mcp-k8s-darwin-arm64/bin/mcp-k8s-go

# Linux
cp dist/mcp-k8s-go_linux_amd64_v1/mcp-k8s-go ./packages/npm-mcp-k8s-linux-x64/bin/mcp-k8s-go
chmod +x ./packages/npm-mcp-k8s-linux-x64/bin/mcp-k8s-go
cp dist/mcp-k8s-go_linux_arm64_v8.0/mcp-k8s-go ./packages/npm-mcp-k8s-linux-arm64/bin/mcp-k8s-go
chmod +x ./packages/npm-mcp-k8s-linux-arm64/bin/mcp-k8s-go

# Windows
cp dist/mcp-k8s-go_windows_amd64_v1/mcp-k8s-go.exe ./packages/npm-mcp-k8s-win-x64/bin/mcp-k8s-go.exe
cp dist/mcp-k8s-go_windows_arm64_v8.0/mcp-k8s-go.exe ./packages/npm-mcp-k8s-win-arm64/bin/mcp-k8s-go.exe

Expand Down
5 changes: 5 additions & 0 deletions packages/update_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# replace previous version with new version in all .json files in ./packages folder
find ./packages -type f -name '*.json' -exec sed -i '' -e 's/0.0.9/0.0.10/g' {} \;

0 comments on commit 742f6e3

Please sign in to comment.