Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/build-alpha-release-notes/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ runs:
git log "${{ inputs.latest-tag }}..HEAD" \
--oneline \
--no-merges |
grep -v -E 'github-actions\[bot\]|dependabot\[bot\]|test|Bump' |
grep -v -E 'github-actions\[bot\]|dependabot\[bot\]|test|Bump|chore' || true |
sed 's/^[a-f0-9]\{7,40\} //' | # remove SHA prefix
awk '!seen[$0]++' |
sed 's/^/- /'
} > docs/release.md
- name: Upload UI artifact
- name: Upload release notes
uses: actions/upload-artifact@v4
with:
name: release-notes
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/publish-website/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:
steps:
- uses: actions/setup-node@v4
with:
node-version: 23.11.1
node-version: 24
registry-url: 'https://registry.npmjs.org'
- id: release
uses: pozetroninc/github-action-get-latest-release@master
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/run-frontend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
shell: bash
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: Install and Build
working-directory: ./webui
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 23
node-version: 24
- name: build webui
working-directory: ./webui
run: |
Expand Down
110 changes: 109 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,114 @@ permissions:
contents: write

jobs:
build-dashboard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.25.5
- uses: ./.github/actions/build-release-notes
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- run: npm install
working-directory: ./webui
- name: Install taskfile
run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
- name: Build
run: task build-vue-app
- name: Upload UI artifact
uses: actions/upload-artifact@v4
with:
name: dashboard
path: webui/dist

release-unix:
needs: build-dashboard
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download dashboard
uses: actions/download-artifact@v4
with:
name: dashboard
path: webui/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/login-action@v1
with:
username: marle3003
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/setup-go@v5
with:
go-version: 1.25.5
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

release-windows:
needs: build-dashboard
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download dashboard
uses: actions/download-artifact@v4
with:
name: dashboard
path: webui/dist
- uses: actions/setup-go@v5
with:
go-version: 1.25.5
- name: Install goversioninfo
run: go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@v1.4.0
- name: Generate Windows metadata (.syso)
working-directory: ./cmd/mokapi
shell: pwsh
run: |
$versionParts = ($env:GITHUB_REF -replace '.*/v', '').Split('.')
'{}' | Out-File versioninfo.json -NoNewline ascii
goversioninfo -64 `
-platform-specific='true' `
-charset="1200" `
-company="Mokapi OpenSource" `
-copyright="© Marcel Lehmann. Licensed under MIT." `
-description="Your API Mocking Tool for Agile Development, using Go and JavaScript" `
-icon="../../icon.ico" `
-internal-name="mokapi" `
-original-name="mokapi.exe" `
-product-name="mokapi" `
-translation="0x0409" `
-ver-major="$($versionParts[0])" `
-ver-minor="$($versionParts[1])" `
-ver-patch="$($versionParts[2])" `
-product-version="$($versionParts[0]).$($versionParts[1]).$($versionParts[2])"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release -f .goreleaser.windows.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

release-npm:
runs-on: ubuntu-latest
Expand All @@ -26,6 +134,6 @@ jobs:
- name: Install taskfile
run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
- name: Publish
run: task publish-npm-package VERSION=${GITHUB_REF##*/v}
run: task publish-all VERSION=${GITHUB_REF##*/v}
env:
CGO_ENABLED: 0
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# vendor/
data/*
dist/
bin/*
**/bin/
obj/
Debug/

Expand Down
112 changes: 74 additions & 38 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,6 @@
version: '3'

tasks:
default:
deps: [build-vue-app]
cmds:
- task: build-windows
build-windows:
deps: [build-vue-app]
cmds:
- go build -o mokapi-windows-amd64.exe -ldflags="-w -s -X 'mokapi/version.BuildVersion=1.0'" ./cmd/mokapi
env:
GOOS: windows
GOARCH: amd64
build-linux:
deps: [build-vue-app]
cmds:
- go build -o mokapi-linux-amd64 -ldflags="-X 'mokapi/version.BuildVersion=1.0'" ./cmd/mokapi
env:
GOOS: linux
GOARCH: amd64
build-macos:
cmds:
- go build -o mokapi-darwin-arm64 -ldflags="-X 'mokapi/version.BuildVersion=1.0'" ./cmd/mokapi
env:
GOOS: darwin
GOARCH: arm64
build-vue-app:
deps: [ensure-dist-folder]
dir: webui
Expand All @@ -36,36 +12,96 @@ tasks:
- go run ../cmd/internal/gen-cli-docs/main.go --output-dir ./webui/src/assets/docs/configuration/static
- npm version {{.VERSION}}
- npm run build-dashboard
build-npm-package:
deps: [build-vue-app]
publish-all:
deps: [ build-vue-app ]
cmds:
- task npm-build-windows VERSION={{.VERSION}}
- task npm-build-linux VERSION={{.VERSION}}
- task npm-build-macos VERSION={{.VERSION}}
publish-npm-package:
deps: [build-npm-package]
dir: npm
- task publish-platform-dependent VERSION={{.VERSION}}
- task publish-mokapi VERSION={{.VERSION}}
publish-platform-dependent:
deps:
- publish-mokapi-windows-x64
- publish-mokapi-windows-arm64
- publish-mokapi-linux-x64
- publish-mokapi-linux-arm64
- publish-mokapi-macos-x64
- publish-mokapi-macos-arm64
publish-mokapi:
dir: npm/go-mokapi
cmds:
- npm version {{.VERSION}}
- npm publish --provenance
npm-build-windows:
publish-mokapi-windows-x64:
deps: [ build-mokapi-windows-x64 ]
dir: npm/@go-mokapi/win32-x64
cmds:
- npm version {{.VERSION}}
- npm publish --provenance --access public
build-mokapi-windows-x64:
cmds:
- go build -o ./npm/dist/mokapi-windows-amd64/mokapi.exe -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
- go build -o ./npm/@go-mokapi/win32-x64/bin/mokapi.exe -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
env:
GOOS: windows
GOARCH: amd64
npm-build-linux:
publish-mokapi-windows-arm64:
deps: [ build-mokapi-windows-arm64 ]
dir: npm/@go-mokapi/win32-arm64
cmds:
- go build -o ./npm/dist/mokapi-linux-amd64/mokapi -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
- npm version {{.VERSION}}
- npm publish --provenance --access public
build-mokapi-windows-arm64:
cmds:
- go build -o ./npm/@go-mokapi/win32-arm64/bin/mokapi.exe -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
env:
GOOS: windows
GOARCH: arm64
publish-mokapi-linux-x64:
deps: [ build-mokapi-linux-x64 ]
dir: npm/@go-mokapi/linux-x64
cmds:
- npm version {{.VERSION}}
- npm publish --provenance --access public
build-mokapi-linux-x64:
cmds:
- go build -o ./npm/@go-mokapi/linux-x64/bin/mokapi -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
env:
GOOS: linux
GOARCH: amd64
npm-build-macos:
publish-mokapi-linux-arm64:
deps: [ build-mokapi-linux-arm64 ]
dir: npm/@go-mokapi/linux-arm64
cmds:
- npm version {{.VERSION}}
- npm publish --provenance --access public
build-mokapi-linux-arm64:
cmds:
- go build -o ./npm/@go-mokapi/linux-arm64/bin/mokapi -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
env:
GOOS: linux
GOARCH: arm64
publish-mokapi-macos-arm64:
deps: [ build-mokapi-macos-arm64 ]
dir: npm/@go-mokapi/darwin-arm64
cmds:
- npm version {{.VERSION}}
- npm publish --provenance --access public
build-mokapi-macos-arm64:
cmds:
- go build -o ./npm/dist/mokapi-darwin-arm64/mokapi -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
- go build -o ./npm/@go-mokapi/darwin-arm64/bin/mokapi -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
env:
GOOS: darwin
GOARCH: arm64
publish-mokapi-macos-x64:
deps: [ build-mokapi-macos-x64 ]
dir: npm/@go-mokapi/darwin-x64
cmds:
- npm version {{.VERSION}}
- npm publish --provenance --access public
build-mokapi-macos-x64:
cmds:
- go build -o ./npm/@go-mokapi/darwin-x64/bin/mokapi -ldflags="-X mokapi/version.BuildVersion={{.VERSION}}" ./cmd/mokapi
env:
GOOS: darwin
GOARCH: amd64
ensure-dist-folder:
cmds:
- mkdir -p webui/dist
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/blogs/end-to-end-testing-mocked-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Install Dependencies
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/tutorials/running-mokapi-github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Install Dependencies
run: npm install
Expand Down
4 changes: 4 additions & 0 deletions npm/@go-mokapi/darwin-arm64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# mokapi

This package contains the **macOS ARM 64-bit binary** for **mokapi**, an API mocking tool.
See https://mokapi.io for details
2 changes: 2 additions & 0 deletions npm/@go-mokapi/darwin-arm64/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const path = require('path');
module.exports = path.join(__dirname, 'bin/mokapi');
19 changes: 19 additions & 0 deletions npm/@go-mokapi/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@go-mokapi/darwin-arm64",
"version": "0.36.0",
"description": "The macOS ARM 64-bit binary for mokapi, an API mocking tool",
"homepage": "https://mokapi.io",
"repository": {
"type": "git",
"url": "git+https://github.com/marle3003/mokapi.git"
},
"author": "Marcel Lehmann",
"license": "MIT",
"preferUnplugged": true,
"os": [
"darwin"
],
"cpu": [
"arm64"
]
}
4 changes: 4 additions & 0 deletions npm/@go-mokapi/darwin-x64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# mokapi

This package contains the **macOS 64-bit binary** for **mokapi**, an API mocking tool.
See https://mokapi.io for details
2 changes: 2 additions & 0 deletions npm/@go-mokapi/darwin-x64/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const path = require('path');
module.exports = path.join(__dirname, 'bin/mokapi');
19 changes: 19 additions & 0 deletions npm/@go-mokapi/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@go-mokapi/darwin-x64",
"version": "0.36.0",
"description": "The macOS 64-bit binary for mokapi, an API mocking tool",
"homepage": "https://mokapi.io",
"repository": {
"type": "git",
"url": "git+https://github.com/marle3003/mokapi.git"
},
"author": "Marcel Lehmann",
"license": "MIT",
"preferUnplugged": true,
"os": [
"darwin"
],
"cpu": [
"x64"
]
}
Loading
Loading