release: v0.9.1 - fix API 404 routing issue #12
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*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build and Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify checkout | |
| run: | | |
| ls -la | |
| cat go.mod | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: web/frontend/package-lock.json | |
| - name: Build frontend | |
| run: | | |
| cd web/frontend | |
| npm ci | |
| npm run build | |
| - name: Run tests | |
| run: go test -v ./... | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Build binaries | |
| run: | | |
| mkdir -p dist | |
| # Linux AMD64 | |
| GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dist/taskflow-linux-amd64 ./cmd/taskflow | |
| # Linux ARM64 | |
| GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o dist/taskflow-linux-arm64 ./cmd/taskflow | |
| # macOS AMD64 (Intel) | |
| GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o dist/taskflow-darwin-amd64 ./cmd/taskflow | |
| # macOS ARM64 (Apple Silicon) | |
| GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o dist/taskflow-darwin-arm64 ./cmd/taskflow | |
| # Windows AMD64 | |
| GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o dist/taskflow-windows-amd64.exe ./cmd/taskflow | |
| - name: Create checksums | |
| run: | | |
| cd dist | |
| sha256sum * > checksums.txt | |
| - name: List built files | |
| run: ls -la dist/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| name: ${{ steps.version.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| files: | | |
| dist/taskflow-linux-amd64 | |
| dist/taskflow-linux-arm64 | |
| dist/taskflow-darwin-amd64 | |
| dist/taskflow-darwin-arm64 | |
| dist/taskflow-windows-amd64.exe | |
| dist/checksums.txt |