Merge pull request #738 from marle3003/develop #269
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: | |
| push: | |
| tags: | |
| - 'v*' | |
| - '!v*-beta' | |
| jobs: | |
| release-linux: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_CLI_EXPERIMENTAL: "enabled" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - 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.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin | |
| - run: npm install | |
| working-directory: ./webui | |
| - name: Build | |
| run: task build-vue-app | |
| env: | |
| CGO_ENABLED: 0 | |
| - 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 }} | |
| - name: Publish npm | |
| run: task publish-npm-package VERSION=${GITHUB_REF##*/v} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| release-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.25.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: choco install go-task | |
| - run: npm install | |
| working-directory: ./webui | |
| - name: Build | |
| run: task build-vue-app | |
| env: | |
| CGO_ENABLED: 0 | |
| - name: Install goversioninfo | |
| run: go install github.com/josephspurrier/goversioninfo/cmd/[email protected] | |
| - 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 }} |