Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .github/workflows/release_build_infisical_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

goreleaser:
runs-on: ubuntu-latest-8-cores
# needs: [cli-integration-tests]
needs: [goreleaser-windows] # For quick iteration, we're releasing Windows images first
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: The comment says "For quick iteration, we're releasing Windows images first", but this creates a hard dependency where the main Linux build cannot complete without Windows builds succeeding first. If Windows builds fail, the entire release pipeline (including npm release) will be blocked.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release_build_infisical_cli.yml
Line: 87:87

Comment:
**style:** The comment says "For quick iteration, we're releasing Windows images first", but this creates a hard dependency where the main Linux build cannot complete without Windows builds succeeding first. If Windows builds fail, the entire release pipeline (including npm release) will be blocked.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary

steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -151,3 +151,39 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.INFISICAL_CLI_REPO_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.INFISICAL_CLI_REPO_AWS_SECRET_ACCESS_KEY }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.INFISICAL_CLI_REPO_CLOUDFRONT_DISTRIBUTION_ID }}

goreleaser-windows:
runs-on: windows-2022
# needs: [goreleaser]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Fetch all tags
run: git fetch --force --tags

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.19.3"
cache: true
cache-dependency-path: go.sum

- name: 🐋 Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🔧 Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: v1.26.2-pro
args: release --clean --config goreleaser-windows.yaml --skip-validate
env:
POSTHOG_API_KEY_FOR_CLI: ${{ secrets.POSTHOG_API_KEY_FOR_CLI }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
52 changes: 52 additions & 0 deletions .goreleaser-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
builds:
- id: windows-build
env:
- CGO_ENABLED=0
binary: infisical
ldflags:
- -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }}
- -X github.com/Infisical/infisical-merge/packages/telemetry.POSTHOG_API_KEY_FOR_CLI={{ .Env.POSTHOG_API_KEY_FOR_CLI }}
flags:
- -trimpath
goos:
- windows
goarch:
- amd64
- arm64

dockers:
- dockerfile: docker/windows
goos: windows
goarch: amd64
use: buildx
ids:
- windows-build
image_templates:
- "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-windows-amd64"
- "infisical/cli:latest-windows-amd64"
build_flag_templates:
- "--pull"
- "--platform=windows/amd64"

- dockerfile: docker/windows
goos: windows
goarch: arm64
use: buildx
ids:
- windows-build
image_templates:
- "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-windows-arm64"
- "infisical/cli:latest-windows-arm64"
build_flag_templates:
- "--pull"
- "--platform=windows/arm64"
docker_manifests:
- name_template: "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-windows"
image_templates:
- "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-windows-amd64"
- "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-windows-arm64"

- name_template: "infisical/cli:latest-windows"
image_templates:
- "infisical/cli:latest-windows-amd64"
- "infisical/cli:latest-windows-arm64"
3 changes: 3 additions & 0 deletions docker/windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
COPY infisical.exe /infisical.exe
ENTRYPOINT ["C:\\infisical.exe"]
Loading