From 9ea5eea82288a653fdbe8b3a04a7e1c7def5d99c Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 14:35:18 +0900 Subject: [PATCH 01/24] version --- BUILD | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BUILD b/BUILD index 8127909..36cd77f 100644 --- a/BUILD +++ b/BUILD @@ -20,3 +20,12 @@ gazelle_test( tags = ["manual"], workspace = "//:BUILD", ) + +load("//:version.bzl", "VERSION") + +genrule( + name = "version", + outs = ["print_version.sh"], + cmd = "echo '#!/bin/bash\necho " + VERSION + "' > $@", + executable = True, +) From cbe0e76b9926a0e326b15e625fbcc091b27707f4 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 14:47:24 +0900 Subject: [PATCH 02/24] version --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a595a3a..268dc10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref }} - uses: actions/cache@v4 with: path: | @@ -48,12 +50,17 @@ jobs: needs: [build-and-test] strategy: matrix: - os: [linux, windows, darwin] - arch: [amd64, arm64] + # FIXME + # os: [linux, windows, darwin] + # arch: [amd64, arm64] + os: [linux] + arch: [amd64] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref }} - uses: actions/cache@v4 with: path: | From b7e1deee2bc495177ddd171689b235a23e372b34 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 14:50:50 +0900 Subject: [PATCH 03/24] version --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 268dc10..d9658cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,7 +60,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.ref }} + ref: ${{ github.event.inputs.ref || github.ref }} - uses: actions/cache@v4 with: path: | @@ -69,6 +69,7 @@ jobs: key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} restore-keys: bazel- - run: bazel/tools/update_version_bzl.sh version.bzl + - run: bazelisk run //:version > version.txt - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - name: Package binary @@ -94,6 +95,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref || github.ref }} - uses: actions/cache@v4 with: path: | @@ -119,6 +122,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref || github.ref }} - name: Download all artifacts uses: actions/download-artifact@v4 From 834767a88fff74045eec2f555cfa7d345db7306d Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 14:56:18 +0900 Subject: [PATCH 04/24] version --- .github/workflows/main.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9658cf..5b0b428 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.ref }} + ref: ${{ github.event.inputs.version }} - uses: actions/cache@v4 with: path: | @@ -60,7 +60,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.ref || github.ref }} + ref: ${{ github.event.inputs.version || github.ref }} - uses: actions/cache@v4 with: path: | @@ -69,7 +69,6 @@ jobs: key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} restore-keys: bazel- - run: bazel/tools/update_version_bzl.sh version.bzl - - run: bazelisk run //:version > version.txt - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - name: Package binary @@ -96,7 +95,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.ref || github.ref }} + ref: ${{ github.event.inputs.version || github.ref }} - uses: actions/cache@v4 with: path: | @@ -123,18 +122,20 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.ref || github.ref }} - + ref: ${{ github.event.inputs.version || github.ref }} - name: Download all artifacts uses: actions/download-artifact@v4 with: pattern: tools-* + - name: Read version from file + id: version + run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT - name: Create Release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ inputs.version }} - name: Release ${{ inputs.version }} + tag_name: test-${{ steps.version.outputs.value }} + name: Test Release ${{ steps.version.outputs.value }} # TODO: Change to non-draft after testing. draft: true files: | From 936e796ae496ddae4f118beeea5ce37fd9b0c8b1 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 14:57:29 +0900 Subject: [PATCH 05/24] fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b0b428..31049fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.version }} + ref: ${{ github.event.inputs.version || github.ref }} - uses: actions/cache@v4 with: path: | From 3281864e54bf42256463050a5e44158637b690ec Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 15:01:05 +0900 Subject: [PATCH 06/24] steps --- .github/workflows/main.yml | 73 +++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31049fb..771719e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,23 +31,24 @@ on: type: string jobs: - build-and-test: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.version || github.ref }} - - uses: actions/cache@v4 - with: - path: | - ~/.cache/bazelisk - ~/.cache/bazel - key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - restore-keys: bazel- - - run: bazelisk test //... + # build-and-test: + # runs-on: ubuntu-22.04 + # steps: + # - uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.inputs.version || github.ref }} + # - uses: actions/cache@v4 + # with: + # path: | + # ~/.cache/bazelisk + # ~/.cache/bazel + # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + # restore-keys: bazel- + # - run: bazelisk test //... build-and-upload-tools: - needs: [build-and-test] + # FIXME + # needs: [build-and-test] strategy: matrix: # FIXME @@ -89,27 +90,27 @@ jobs: name: tools-${{ matrix.os }}-${{ matrix.arch }} path: "*.zip" - build-and-upload-docs: - needs: [build-and-test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.version || github.ref }} - - uses: actions/cache@v4 - with: - path: | - ~/.cache/bazelisk - ~/.cache/bazel - key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - restore-keys: bazel- - - run: bazelisk build "//api:api.html" - - name: Upload API docs - uses: actions/upload-artifact@v4 - with: - name: api.html - path: | - bazel-bin/api/api.html/api.html + # build-and-upload-docs: + # needs: [build-and-test] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.inputs.version || github.ref }} + # - uses: actions/cache@v4 + # with: + # path: | + # ~/.cache/bazelisk + # ~/.cache/bazel + # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + # restore-keys: bazel- + # - run: bazelisk build "//api:api.html" + # - name: Upload API docs + # uses: actions/upload-artifact@v4 + # with: + # name: api.html + # path: | + # bazel-bin/api/api.html/api.html create-release: needs: [build-and-upload-tools] From b43001e06c1e684bac487ec6c9e864f1fb74b43d Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 15:05:28 +0900 Subject: [PATCH 07/24] steps --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 771719e..25c2195 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,6 +70,10 @@ jobs: key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} restore-keys: bazel- - run: bazel/tools/update_version_bzl.sh version.bzl + - name: Read version + id: version + run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT + - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - name: Package binary @@ -129,7 +133,7 @@ jobs: with: pattern: tools-* - - name: Read version from file + - name: Read version id: version run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT - name: Create Release From 74a330622a288391f7c5f992fecd111573a1d06c Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 15:09:17 +0900 Subject: [PATCH 08/24] steps --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 25c2195..33fbd0f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,6 +73,8 @@ jobs: - name: Read version id: version run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT + - name: Echo version + run: echo ${{ steps.version.outputs.value }} - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl From a21d936c695a6ccc16efd14d86038888aefee88b Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Wed, 20 Aug 2025 15:10:13 +0900 Subject: [PATCH 09/24] steps --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 33fbd0f..64a627d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ name: Bazel on: pull_request: {} - push: {} + # push: {} release: types: [published] workflow_dispatch: From e3c9d35b282726ccdfe92ff9d14b3617e540a793 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:05:03 +0900 Subject: [PATCH 10/24] comment --- .github/workflows/main.yml | 102 +++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 49 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64a627d..f47086b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,55 +46,55 @@ jobs: # restore-keys: bazel- # - run: bazelisk test //... - build-and-upload-tools: - # FIXME - # needs: [build-and-test] - strategy: - matrix: - # FIXME - # os: [linux, windows, darwin] - # arch: [amd64, arm64] - os: [linux] - arch: [amd64] + # build-and-upload-tools: + # # FIXME + # # needs: [build-and-test] + # strategy: + # matrix: + # # FIXME + # # os: [linux, windows, darwin] + # # arch: [amd64, arm64] + # os: [linux] + # arch: [amd64] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.version || github.ref }} - - uses: actions/cache@v4 - with: - path: | - ~/.cache/bazelisk - ~/.cache/bazel - key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - restore-keys: bazel- - - run: bazel/tools/update_version_bzl.sh version.bzl - - name: Read version - id: version - run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT - - name: Echo version - run: echo ${{ steps.version.outputs.value }} + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.inputs.version || github.ref }} + # - uses: actions/cache@v4 + # with: + # path: | + # ~/.cache/bazelisk + # ~/.cache/bazel + # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + # restore-keys: bazel- + # - run: bazel/tools/update_version_bzl.sh version.bzl + # - name: Read version + # id: version + # run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT + # - name: Echo version + # run: echo ${{ steps.version.outputs.value }} - - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl + # - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - - name: Package binary - if: ${{ matrix.os != 'windows' }} - run: | - zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl - zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent + # - name: Package binary + # if: ${{ matrix.os != 'windows' }} + # run: | + # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl + # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent - - name: Package binary - Windows - if: ${{ matrix.os == 'windows' }} - run: | - zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe - zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe + # - name: Package binary - Windows + # if: ${{ matrix.os == 'windows' }} + # run: | + # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe + # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe - - name: Upload binary - uses: actions/upload-artifact@v4 - with: - name: tools-${{ matrix.os }}-${{ matrix.arch }} - path: "*.zip" + # - name: Upload binary + # uses: actions/upload-artifact@v4 + # with: + # name: tools-${{ matrix.os }}-${{ matrix.arch }} + # path: "*.zip" # build-and-upload-docs: # needs: [build-and-test] @@ -119,12 +119,16 @@ jobs: # bazel-bin/api/api.html/api.html create-release: - needs: [build-and-upload-tools] + # needs: [build-and-upload-tools] runs-on: ubuntu-latest - if: | - github.event_name == 'workflow_dispatch' && - inputs.create_release == true && - inputs.version != '' + # if: | + # github.event_name == 'workflow_dispatch' && + # inputs.create_release == true && + # inputs.version != '' + # if: | + # github.event_name == 'workflow_dispatch' && + # inputs.create_release == true && + # inputs.version != '' steps: - uses: actions/checkout@v4 From 5c35760a74d1cdc70d04cf47a1985be957dc1ce5 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:11:23 +0900 Subject: [PATCH 11/24] try --- .github/workflows/main.yml | 88 +++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f47086b..1e6da79 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,55 +46,55 @@ jobs: # restore-keys: bazel- # - run: bazelisk test //... - # build-and-upload-tools: - # # FIXME - # # needs: [build-and-test] - # strategy: - # matrix: - # # FIXME - # # os: [linux, windows, darwin] - # # arch: [amd64, arm64] - # os: [linux] - # arch: [amd64] + build-and-upload-tools: + # FIXME + # needs: [build-and-test] + strategy: + matrix: + # FIXME + # os: [linux, windows, darwin] + # arch: [amd64, arm64] + os: [linux] + arch: [amd64] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.inputs.version || github.ref }} - # - uses: actions/cache@v4 - # with: - # path: | - # ~/.cache/bazelisk - # ~/.cache/bazel - # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - # restore-keys: bazel- - # - run: bazel/tools/update_version_bzl.sh version.bzl - # - name: Read version - # id: version - # run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT - # - name: Echo version - # run: echo ${{ steps.version.outputs.value }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.version || github.ref }} + - uses: actions/cache@v4 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel + key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + restore-keys: bazel- + - run: bazel/tools/update_version_bzl.sh version.bzl + - name: Read version + id: version + run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT + - name: Echo version + run: echo ${{ steps.version.outputs.value }} - # - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl + - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - # - name: Package binary - # if: ${{ matrix.os != 'windows' }} - # run: | - # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl - # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent + - name: Package binary + if: ${{ matrix.os != 'windows' }} + run: | + zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl + zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent - # - name: Package binary - Windows - # if: ${{ matrix.os == 'windows' }} - # run: | - # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe - # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe + - name: Package binary - Windows + if: ${{ matrix.os == 'windows' }} + run: | + zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe + zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe - # - name: Upload binary - # uses: actions/upload-artifact@v4 - # with: - # name: tools-${{ matrix.os }}-${{ matrix.arch }} - # path: "*.zip" + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: tools-${{ matrix.os }}-${{ matrix.arch }} + path: "*.zip" # build-and-upload-docs: # needs: [build-and-test] From 92e85cd9de49ae017d37a22d025f3d302d313772 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:12:18 +0900 Subject: [PATCH 12/24] try --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e6da79..1232b5b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -119,7 +119,7 @@ jobs: # bazel-bin/api/api.html/api.html create-release: - # needs: [build-and-upload-tools] + needs: [build-and-upload-tools] runs-on: ubuntu-latest # if: | # github.event_name == 'workflow_dispatch' && From e3c4a3e14372f6a784508e57c2995c46d1501dc6 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:17:24 +0900 Subject: [PATCH 13/24] try --- .github/workflows/main.yml | 91 +++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1232b5b..7654933 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,55 +46,55 @@ jobs: # restore-keys: bazel- # - run: bazelisk test //... - build-and-upload-tools: - # FIXME - # needs: [build-and-test] - strategy: - matrix: - # FIXME - # os: [linux, windows, darwin] - # arch: [amd64, arm64] - os: [linux] - arch: [amd64] + # build-and-upload-tools: + # # FIXME + # # needs: [build-and-test] + # strategy: + # matrix: + # # FIXME + # # os: [linux, windows, darwin] + # # arch: [amd64, arm64] + # os: [linux] + # arch: [amd64] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.version || github.ref }} - - uses: actions/cache@v4 - with: - path: | - ~/.cache/bazelisk - ~/.cache/bazel - key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - restore-keys: bazel- - - run: bazel/tools/update_version_bzl.sh version.bzl - - name: Read version - id: version - run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT - - name: Echo version - run: echo ${{ steps.version.outputs.value }} + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.inputs.version || github.ref }} + # - uses: actions/cache@v4 + # with: + # path: | + # ~/.cache/bazelisk + # ~/.cache/bazel + # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + # restore-keys: bazel- + # - run: bazel/tools/update_version_bzl.sh version.bzl + # - name: Read version + # id: version + # run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT + # - name: Echo version + # run: echo ${{ steps.version.outputs.value }} - - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl + # - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - - name: Package binary - if: ${{ matrix.os != 'windows' }} - run: | - zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl - zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent + # - name: Package binary + # if: ${{ matrix.os != 'windows' }} + # run: | + # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl + # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent - - name: Package binary - Windows - if: ${{ matrix.os == 'windows' }} - run: | - zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe - zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe + # - name: Package binary - Windows + # if: ${{ matrix.os == 'windows' }} + # run: | + # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe + # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe - - name: Upload binary - uses: actions/upload-artifact@v4 - with: - name: tools-${{ matrix.os }}-${{ matrix.arch }} - path: "*.zip" + # - name: Upload binary + # uses: actions/upload-artifact@v4 + # with: + # name: tools-${{ matrix.os }}-${{ matrix.arch }} + # path: "*.zip" # build-and-upload-docs: # needs: [build-and-test] @@ -119,7 +119,7 @@ jobs: # bazel-bin/api/api.html/api.html create-release: - needs: [build-and-upload-tools] + # needs: [build-and-upload-tools] runs-on: ubuntu-latest # if: | # github.event_name == 'workflow_dispatch' && @@ -139,6 +139,7 @@ jobs: with: pattern: tools-* + - run: bazel/tools/update_version_bzl.sh version.bzl - name: Read version id: version run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT From 416a3ff564c3708581bea10cfaae004a15c854d1 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:23:36 +0900 Subject: [PATCH 14/24] try --- .github/workflows/main.yml | 132 ++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7654933..2d0bc94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,80 +46,80 @@ jobs: # restore-keys: bazel- # - run: bazelisk test //... - # build-and-upload-tools: - # # FIXME - # # needs: [build-and-test] - # strategy: - # matrix: - # # FIXME - # # os: [linux, windows, darwin] - # # arch: [amd64, arm64] - # os: [linux] - # arch: [amd64] + build-and-upload-tools: + # FIXME + # needs: [build-and-test] + strategy: + matrix: + # FIXME + # os: [linux, windows, darwin] + # arch: [amd64, arm64] + os: [linux] + arch: [amd64] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.inputs.version || github.ref }} - # - uses: actions/cache@v4 - # with: - # path: | - # ~/.cache/bazelisk - # ~/.cache/bazel - # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - # restore-keys: bazel- - # - run: bazel/tools/update_version_bzl.sh version.bzl - # - name: Read version - # id: version - # run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT - # - name: Echo version - # run: echo ${{ steps.version.outputs.value }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.version || github.ref }} + - uses: actions/cache@v4 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel + key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + restore-keys: bazel- + - run: bazel/tools/update_version_bzl.sh version.bzl + - name: Read version + id: version + run: echo "value=$(bazelisk run //:version)" >> $GITHUB_OUTPUT + - name: Echo version + run: echo ${{ steps.version.outputs.value }} - # - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl + - run: bazelisk build --stamp "--platforms=@rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" //agent/cmd/agent //tools/nbictl/cmd/nbictl - # - name: Package binary - # if: ${{ matrix.os != 'windows' }} - # run: | - # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl - # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent + - name: Package binary + if: ${{ matrix.os != 'windows' }} + run: | + zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl + zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent - # - name: Package binary - Windows - # if: ${{ matrix.os == 'windows' }} - # run: | - # zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe - # zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe + - name: Package binary - Windows + if: ${{ matrix.os == 'windows' }} + run: | + zip -j nbictl-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/tools/nbictl/cmd/nbictl/nbictl_/nbictl.exe + zip -j agent-${{ matrix.os }}-${{ matrix.arch }}.zip bazel-bin/agent/cmd/agent/agent_/agent.exe - # - name: Upload binary - # uses: actions/upload-artifact@v4 - # with: - # name: tools-${{ matrix.os }}-${{ matrix.arch }} - # path: "*.zip" + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: tools-${{ matrix.os }}-${{ matrix.arch }} + path: "*.zip" - # build-and-upload-docs: - # needs: [build-and-test] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.inputs.version || github.ref }} - # - uses: actions/cache@v4 - # with: - # path: | - # ~/.cache/bazelisk - # ~/.cache/bazel - # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - # restore-keys: bazel- - # - run: bazelisk build "//api:api.html" - # - name: Upload API docs - # uses: actions/upload-artifact@v4 - # with: - # name: api.html - # path: | - # bazel-bin/api/api.html/api.html + build-and-upload-docs: + needs: [build-and-test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.version || github.ref }} + - uses: actions/cache@v4 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel + key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + restore-keys: bazel- + - run: bazelisk build "//api:api.html" + - name: Upload API docs + uses: actions/upload-artifact@v4 + with: + name: api.html + path: | + bazel-bin/api/api.html/api.html create-release: - # needs: [build-and-upload-tools] + needs: [build-and-upload-tools] runs-on: ubuntu-latest # if: | # github.event_name == 'workflow_dispatch' && From 0b7cece5ad9cf19e92bbf0027657bed0f5e66b97 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:31:32 +0900 Subject: [PATCH 15/24] try --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d0bc94..d83ec3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,6 +46,7 @@ jobs: # restore-keys: bazel- # - run: bazelisk test //... + build-and-upload-tools: # FIXME # needs: [build-and-test] From 01239bf0abb605ef066c1fd056953ef0699e65e4 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:32:16 +0900 Subject: [PATCH 16/24] try --- .github/workflows/main.yml | 1 - bazel/tools/update_version_bzl.sh | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d83ec3f..2d0bc94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,6 @@ jobs: # restore-keys: bazel- # - run: bazelisk test //... - build-and-upload-tools: # FIXME # needs: [build-and-test] diff --git a/bazel/tools/update_version_bzl.sh b/bazel/tools/update_version_bzl.sh index 9539d8b..5fb677d 100755 --- a/bazel/tools/update_version_bzl.sh +++ b/bazel/tools/update_version_bzl.sh @@ -49,3 +49,5 @@ PATCH = ${git_data[1]}" "$versions_bzl_file_path" sed -i "/^BUILD = /c\\ BUILD = \"${git_data[0]}\"" "$versions_bzl_file_path" + +#FIXME \ No newline at end of file From 1d4aff69519cfd49c18409e9b4db282535e9da68 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:32:45 +0900 Subject: [PATCH 17/24] try --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d0bc94..4fe0435 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ name: Bazel on: pull_request: {} - # push: {} + push: {} release: types: [published] workflow_dispatch: From 6be1dd6d9727fc3872601fc2c866021bd4d85d7a Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 16:55:13 +0900 Subject: [PATCH 18/24] test --- .github/workflows/main.yml | 55 +++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4fe0435..718a400 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,44 +96,37 @@ jobs: name: tools-${{ matrix.os }}-${{ matrix.arch }} path: "*.zip" - build-and-upload-docs: - needs: [build-and-test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.version || github.ref }} - - uses: actions/cache@v4 - with: - path: | - ~/.cache/bazelisk - ~/.cache/bazel - key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - restore-keys: bazel- - - run: bazelisk build "//api:api.html" - - name: Upload API docs - uses: actions/upload-artifact@v4 - with: - name: api.html - path: | - bazel-bin/api/api.html/api.html + # build-and-upload-docs: + # needs: [build-and-test] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.inputs.version || github.ref }} + # - uses: actions/cache@v4 + # with: + # path: | + # ~/.cache/bazelisk + # ~/.cache/bazel + # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + # restore-keys: bazel- + # - run: bazelisk build "//api:api.html" + # - name: Upload API docs + # uses: actions/upload-artifact@v4 + # with: + # name: api.html + # path: | + # bazel-bin/api/api.html/api.html create-release: needs: [build-and-upload-tools] runs-on: ubuntu-latest - # if: | - # github.event_name == 'workflow_dispatch' && - # inputs.create_release == true && - # inputs.version != '' - # if: | - # github.event_name == 'workflow_dispatch' && - # inputs.create_release == true && - # inputs.version != '' - + if: | + startsWith( github.ref, 'refs/heads/release-' ) steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.version || github.ref }} + ref: ${{ github.ref }} - name: Download all artifacts uses: actions/download-artifact@v4 with: From d2da9e739b3e21d7a571f2b3a94ee8ac6f05e634 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 17:05:32 +0900 Subject: [PATCH 19/24] version --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 718a400..abdfe0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -122,11 +122,11 @@ jobs: needs: [build-and-upload-tools] runs-on: ubuntu-latest if: | - startsWith( github.ref, 'refs/heads/release-' ) + startsWith( github.event.inputs.version || github.ref, 'refs/heads/release-' ) steps: - uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + ref: ${{ github.event.inputs.version || github.ref }} - name: Download all artifacts uses: actions/download-artifact@v4 with: From 594f54a5cdd4fb94318cb288c867c97729cd1c4c Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 17:05:46 +0900 Subject: [PATCH 20/24] version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index abdfe0e..0933bdd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ name: Bazel on: pull_request: {} - push: {} + # push: {} release: types: [published] workflow_dispatch: From 766fb6dc8ae58abc962bbe4d13b5e17d994a739f Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 17:05:56 +0900 Subject: [PATCH 21/24] version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0933bdd..d848ce5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ name: Bazel on: - pull_request: {} + # pull_request: {} # push: {} release: types: [published] From dfa9989fcf068abbf32224d83641dce5b615169e Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 17:21:32 +0900 Subject: [PATCH 22/24] ref --- .github/workflows/main.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d848ce5..58dd794 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,8 +25,8 @@ on: description: "Create GitHub release" type: boolean default: false - version: - description: "Release version" + ref: + description: "Release version ref" required: false type: string @@ -36,7 +36,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # with: - # ref: ${{ github.event.inputs.version || github.ref }} + # ref: ${{ github.event.inputs.ref || github.ref }} # - uses: actions/cache@v4 # with: # path: | @@ -61,7 +61,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.version || github.ref }} + ref: ${{ github.event.inputs.ref || github.ref }} - uses: actions/cache@v4 with: path: | @@ -102,7 +102,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # with: - # ref: ${{ github.event.inputs.version || github.ref }} + # ref: ${{ github.event.inputs.ref || github.ref }} # - uses: actions/cache@v4 # with: # path: | @@ -122,11 +122,12 @@ jobs: needs: [build-and-upload-tools] runs-on: ubuntu-latest if: | - startsWith( github.event.inputs.version || github.ref, 'refs/heads/release-' ) + (github.event_name == 'push' && startsWith( github.ref, 'refs/heads/release-' )) + || (github.event_name == 'workflow_dispatch' && inputs.create_release == true && inputs.ref != '') steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.version || github.ref }} + ref: ${{ github.event.inputs.ref || github.ref }} - name: Download all artifacts uses: actions/download-artifact@v4 with: @@ -139,6 +140,7 @@ jobs: - name: Create Release uses: softprops/action-gh-release@v2 with: + # FIXME tag_name: test-${{ steps.version.outputs.value }} name: Test Release ${{ steps.version.outputs.value }} # TODO: Change to non-draft after testing. From d556b9ff5145a6b3a0704c0e96df26b68aecc697 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 17:27:47 +0900 Subject: [PATCH 23/24] cleanup --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58dd794..fd4509a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -122,8 +122,8 @@ jobs: needs: [build-and-upload-tools] runs-on: ubuntu-latest if: | - (github.event_name == 'push' && startsWith( github.ref, 'refs/heads/release-' )) - || (github.event_name == 'workflow_dispatch' && inputs.create_release == true && inputs.ref != '') + startsWith( github.ref, 'refs/heads/release-' ) || + (github.event_name == 'workflow_dispatch' && inputs.create_release == true && inputs.ref != '') steps: - uses: actions/checkout@v4 with: From 9944e346ffc5c5875f93afb5c0e70b5483f5dd49 Mon Sep 17 00:00:00 2001 From: Toliver Jue Date: Tue, 2 Sep 2025 17:51:28 +0900 Subject: [PATCH 24/24] fix --- .github/workflows/main.yml | 89 ++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fd4509a..9b8f264 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,8 @@ name: Bazel on: - # pull_request: {} - # push: {} + pull_request: {} + push: {} release: types: [published] workflow_dispatch: @@ -31,31 +31,27 @@ on: type: string jobs: - # build-and-test: - # runs-on: ubuntu-22.04 - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.inputs.ref || github.ref }} - # - uses: actions/cache@v4 - # with: - # path: | - # ~/.cache/bazelisk - # ~/.cache/bazel - # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - # restore-keys: bazel- - # - run: bazelisk test //... + build-and-test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref || github.ref }} + - uses: actions/cache@v4 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel + key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + restore-keys: bazel- + - run: bazelisk test //... build-and-upload-tools: - # FIXME - # needs: [build-and-test] + needs: [build-and-test] strategy: matrix: - # FIXME - # os: [linux, windows, darwin] - # arch: [amd64, arm64] - os: [linux] - arch: [amd64] + os: [linux, windows, darwin] + arch: [amd64, arm64] runs-on: ubuntu-latest steps: @@ -96,27 +92,27 @@ jobs: name: tools-${{ matrix.os }}-${{ matrix.arch }} path: "*.zip" - # build-and-upload-docs: - # needs: [build-and-test] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.inputs.ref || github.ref }} - # - uses: actions/cache@v4 - # with: - # path: | - # ~/.cache/bazelisk - # ~/.cache/bazel - # key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} - # restore-keys: bazel- - # - run: bazelisk build "//api:api.html" - # - name: Upload API docs - # uses: actions/upload-artifact@v4 - # with: - # name: api.html - # path: | - # bazel-bin/api/api.html/api.html + build-and-upload-docs: + needs: [build-and-test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref || github.ref }} + - uses: actions/cache@v4 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel + key: bazel-${{ hashFiles('common.bazelrc', '.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }} + restore-keys: bazel- + - run: bazelisk build "//api:api.html" + - name: Upload API docs + uses: actions/upload-artifact@v4 + with: + name: api.html + path: | + bazel-bin/api/api.html/api.html create-release: needs: [build-and-upload-tools] @@ -140,9 +136,8 @@ jobs: - name: Create Release uses: softprops/action-gh-release@v2 with: - # FIXME - tag_name: test-${{ steps.version.outputs.value }} - name: Test Release ${{ steps.version.outputs.value }} + tag_name: v${{ steps.version.outputs.value }} + name: Release v${{ steps.version.outputs.value }} # TODO: Change to non-draft after testing. draft: true files: |