add information about version and build date to UI #16
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: build | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| id-token: write | ||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Setup Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: 1.25.1 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 24 | ||
| - name: Check licenses and vulnerabilities | ||
| run: make check | ||
| - name: Set version | ||
| - name: Update package.json version | ||
| run: | | ||
| if [[ "${{ github.ref_type }}" == "tag" ]]; then | ||
| TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') | ||
| else | ||
| LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1) | ||
| [ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; } | ||
| TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//') | ||
| echo "Using latest tag: $LATEST_TAG" | ||
| fi | ||
| sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json | ||
| echo "Version: $TAG_VERSION" | ||
| - name: Run ui build | ||
| run: make ui-build | ||
| - name: golangci-lint | ||
| uses: golangci/golangci-lint-action@v8 | ||
| with: | ||
| version: v2.4 | ||
| - name: Tests | ||
| run: make test | ||
| - 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@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and release | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| if: success() && startsWith(github.ref, 'refs/tags/') | ||
| with: | ||
| args: release --clean --verbose --timeout 60m -f .goreleaser.yaml | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||