v0.34.0 #286
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| id-token: write # Required for OIDC | |
| 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: 23 | |
| 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 | |
| env: | |
| CGO_ENABLED: 0 | |
| - 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 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: choco install go-task | |
| - 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: | |
| needs: build-dashboard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download dashboard | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dashboard | |
| path: webui/dist | |
| - name: Install taskfile | |
| run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin | |
| - name: Build | |
| run: task build-vue-app | |
| env: | |
| CGO_ENABLED: 0 | |
| - name: Publish | |
| run: task publish-npm-package VERSION=${GITHUB_REF##*/v} |