Skip to content

Commit a410c09

Browse files
committed
fix for signtool
1 parent 356ade6 commit a410c09

File tree

1 file changed

+75
-44
lines changed

1 file changed

+75
-44
lines changed

.github/workflows/release.yml

Lines changed: 75 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,52 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
goreleaser-unix:
12+
if: false # Temporarily disabled for testing
13+
runs-on:
14+
group: databricks-deco-testing-runner-group
15+
labels: ubuntu-latest-deco
16+
17+
outputs:
18+
artifacts: ${{ steps.releaser.outputs.artifacts }}
19+
20+
steps:
21+
- name: Checkout repository and submodules
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
with:
24+
fetch-depth: 0
25+
fetch-tags: true
26+
27+
- name: Setup Go
28+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
29+
with:
30+
go-version-file: go.mod
31+
cache-dependency-path: |
32+
go.sum
33+
.goreleaser-unix.yaml
34+
35+
# Log into the GitHub Container Registry. The goreleaser action will create
36+
# the docker images and push them to the GitHub Container Registry.
37+
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
38+
with:
39+
registry: "ghcr.io"
40+
username: "${{ github.actor }}"
41+
password: "${{ secrets.GITHUB_TOKEN }}"
42+
43+
# QEMU is required to build cross platform docker images using buildx.
44+
# It allows virtualization of the CPU architecture at the application level.
45+
- name: Set up QEMU dependency
46+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
47+
48+
- name: Run GoReleaser for Unix
49+
id: releaser
50+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
51+
with:
52+
version: ~> v2
53+
args: release -f .goreleaser-unix.yaml
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
1157
goreleaser-windows:
1258
environment: sign
1359
runs-on: windows-latest
@@ -27,6 +73,22 @@ jobs:
2773
go.sum
2874
.goreleaser-windows.yaml
2975
76+
- name: Add signtool to PATH
77+
shell: pwsh
78+
run: |
79+
# Find signtool in Windows SDK
80+
$signtoolPath = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter "signtool.exe" -ErrorAction SilentlyContinue |
81+
Where-Object { $_.FullName -match "x64" } |
82+
Select-Object -First 1 -ExpandProperty DirectoryName
83+
84+
if ($signtoolPath) {
85+
Write-Host "Found signtool at: $signtoolPath"
86+
echo "$signtoolPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
87+
} else {
88+
Write-Error "signtool not found"
89+
exit 1
90+
}
91+
3092
- name: Install Azure Code Signing tools
3193
shell: pwsh
3294
run: |
@@ -60,53 +122,22 @@ jobs:
60122
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
61123
with:
62124
version: ~> v2
63-
args: release -f .goreleaser-windows.yaml --snapshot --skip docker
125+
args: release -f .goreleaser-windows.yaml --snapshot --skip=publish
64126
env:
65127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66128

67-
goreleaser-unix:
68-
if: false # Temporarily disabled for testing
69-
runs-on:
70-
group: databricks-deco-testing-runner-group
71-
labels: ubuntu-latest-deco
72-
73-
outputs:
74-
artifacts: ${{ steps.releaser.outputs.artifacts }}
75-
76-
steps:
77-
- name: Checkout repository and submodules
78-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
79-
with:
80-
fetch-depth: 0
81-
fetch-tags: true
82-
83-
- name: Setup Go
84-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
85-
with:
86-
go-version-file: go.mod
87-
cache-dependency-path: |
88-
go.sum
89-
.goreleaser-unix.yaml
90-
91-
# Log into the GitHub Container Registry. The goreleaser action will create
92-
# the docker images and push them to the GitHub Container Registry.
93-
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
94-
with:
95-
registry: "ghcr.io"
96-
username: "${{ github.actor }}"
97-
password: "${{ secrets.GITHUB_TOKEN }}"
98-
99-
# QEMU is required to build cross platform docker images using buildx.
100-
# It allows virtualization of the CPU architecture at the application level.
101-
- name: Set up QEMU dependency
102-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
103-
104-
- name: Run GoReleaser for Unix
105-
id: releaser
106-
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
107-
with:
108-
version: ~> v2
109-
args: release -f .goreleaser-unix.yaml
129+
- name: Upload Windows artifacts to release
130+
if: false # Temporarily disabled for testing
131+
shell: pwsh
132+
run: |
133+
Get-ChildItem dist -Filter *.zip | ForEach-Object {
134+
Write-Host "Uploading $($_.Name)"
135+
gh release upload ${{ github.ref_name }} $_.FullName
136+
}
137+
Get-ChildItem dist -Filter *SHA256SUMS* | ForEach-Object {
138+
Write-Host "Uploading $($_.Name)"
139+
gh release upload ${{ github.ref_name }} $_.FullName
140+
}
110141
env:
111142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112143

0 commit comments

Comments
 (0)