diff --git a/.gitea/workflows/agent-release.yml b/.gitea/workflows/agent-release.yml index 2a18602..2f2433d 100644 --- a/.gitea/workflows/agent-release.yml +++ b/.gitea/workflows/agent-release.yml @@ -1,50 +1,51 @@ name: Agent Release on: - push: - tags: - - "agent/v*" + push: + tags: + - "agent/v*" jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 + build: + runs-on: ubuntu-docker + container: node:26 + steps: + - name: Checkout + uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.23" - cache: true - cache-dependency-path: agent/go.sum + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.26" + cache: true + cache-dependency-path: agent/go.sum - - name: Extract version - id: version - run: echo "VERSION=${GITHUB_REF_NAME#agent/}" >> $GITHUB_OUTPUT + - name: Extract version + id: version + run: echo "VERSION=${GITHUB_REF_NAME#agent/}" >> $GITHUB_OUTPUT - - name: Build - working-directory: agent - env: - VERSION: ${{ steps.version.outputs.VERSION }} - run: | - mkdir -p dist - GOOS=linux GOARCH=amd64 go build \ - -ldflags="-s -w -X main.Version=${VERSION}" \ - -o dist/keymanager-agent-linux-amd64 ./cmd - GOOS=linux GOARCH=arm64 go build \ - -ldflags="-s -w -X main.Version=${VERSION}" \ - -o dist/keymanager-agent-linux-arm64 ./cmd + - name: Build + working-directory: agent + env: + VERSION: ${{ steps.version.outputs.VERSION }} + run: | + mkdir -p dist + GOOS=linux GOARCH=amd64 go build \ + -ldflags="-s -w -X main.Version=${VERSION}" \ + -o dist/keymanager-agent-linux-amd64 ./cmd + GOOS=linux GOARCH=arm64 go build \ + -ldflags="-s -w -X main.Version=${VERSION}" \ + -o dist/keymanager-agent-linux-arm64 ./cmd - - name: Checksums - working-directory: agent/dist - run: sha256sum keymanager-agent-linux-amd64 keymanager-agent-linux-arm64 > checksums.txt + - name: Checksums + working-directory: agent/dist + run: sha256sum keymanager-agent-linux-amd64 keymanager-agent-linux-arm64 > checksums.txt - - name: Create release - uses: https://gitea.com/actions/gitea-release-action@v1 - with: - token: ${{ secrets.RELEASE_TOKEN }} - files: | - agent/dist/keymanager-agent-linux-amd64 - agent/dist/keymanager-agent-linux-arm64 - agent/dist/checksums.txt + - name: Create release + uses: https://gitea.com/actions/gitea-release-action@v1 + with: + token: ${{ secrets.RELEASE_TOKEN }} + files: | + agent/dist/keymanager-agent-linux-amd64 + agent/dist/keymanager-agent-linux-arm64 + agent/dist/checksums.txt