@@ -38,11 +38,11 @@ jobs:
3838 runs-on : ubuntu-latest
3939 name : Build and upload
4040 steps :
41- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
41+ - uses : actions/checkout@v4
4242 with :
4343 fetch-depth : 0
4444
45- - uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
45+ - uses : actions/setup-go@v5
4646 with :
4747 go-version-file : ' build/embedded/go.mod'
4848 check-latest : true
@@ -65,19 +65,75 @@ jobs:
6565 save-cache : false
6666
6767 - name : Install Zig
68- uses : mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2
68+ uses : mlugg/setup-zig@v2
6969
70- - uses : taiki-e/install-action@288875dd3d64326724fa6d9593062d9f8ba0b131 # v2.67.30
70+ - uses : taiki-e/install-action@v2
7171 with :
7272 tool : cargo-zigbuild@0.20.1
7373
7474 - name : Install Windows cross-compilation dependencies
7575 run : |
76- sudo apt-get install -y llvm
76+ sudo apt-get update && sudo apt-get install -y llvm nasm
77+ sudo ln -sf /usr/bin/llvm-ar /usr/bin/llvm-lib
7778
78- - name : Install cargo-xwin
79+ - name : Install and Pre-cache cargo-xwin
7980 run : |
80- cargo install --locked cargo-xwin --force
81+ cargo install --locked cargo-xwin
82+
83+ rm -rf /home/runner/.cache/cargo-xwin
84+
85+ cd /tmp
86+ cargo new pre_cache_dummy
87+ cd pre_cache_dummy
88+
89+ cargo xwin build --target x86_64-pc-windows-msvc
90+
91+ cd $GITHUB_WORKSPACE
92+
93+ - name : Install go-winres
94+ run : go install github.com/tc-hib/go-winres@latest
95+
96+ - name : Generate Windows Metadata JSONs
97+ run : |
98+ cat <<EOF > /tmp/winres-agent.json
99+ {
100+ "RT_VERSION": {
101+ "#1": {
102+ "0000": {
103+ "info": {
104+ "0409": {
105+ "CompanyName": "New Relic, Inc.",
106+ "FileDescription": "New Relic Agent Control",
107+ "LegalCopyright": "© 2026 New Relic, Inc. All rights reserved.",
108+ "OriginalFilename": "newrelic-agent-control.exe",
109+ "ProductName": "New Relic Agent Control"
110+ }
111+ }
112+ }
113+ }
114+ }
115+ }
116+ EOF
117+
118+ cat <<EOF > /tmp/winres-cli.json
119+ {
120+ "RT_VERSION": {
121+ "#1": {
122+ "0000": {
123+ "info": {
124+ "0409": {
125+ "CompanyName": "New Relic, Inc.",
126+ "FileDescription": "New Relic Agent Control CLI",
127+ "LegalCopyright": "© 2026 New Relic, Inc. All rights reserved.",
128+ "OriginalFilename": "newrelic-agent-control-cli.exe",
129+ "ProductName": "New Relic Agent Control CLI"
130+ }
131+ }
132+ }
133+ }
134+ }
135+ }
136+ EOF
81137
82138 - name : If pre-release, set tag and verify it matches Cargo.toml version
83139 if : ${{ inputs.pre-release}}
@@ -101,22 +157,22 @@ jobs:
101157 echo SKIP_WINDOWS_SIGN="true" >> $GITHUB_ENV
102158
103159 - name : Release packages with GoReleaser
104- uses : goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
160+ uses : goreleaser/goreleaser-action@v6
105161 with :
106- args : release ${{ env.SKIP_UPLOAD_RELEASE }} ${{ env.SKIP_SIGN }} --clean --verbose --timeout 2h
162+ args : release ${{ env.SKIP_UPLOAD_RELEASE }} ${{ env.SKIP_SIGN }} --clean --verbose --timeout 2h --parallelism 1
107163 env :
108164 GITHUB_TOKEN : ${{ secrets.gh_token }}
109- GPG_PRIVATE_KEY_BASE64 : ${{ secrets.gpg_private_key_base64 }} # base64 encoded
165+ GPG_PRIVATE_KEY_BASE64 : ${{ secrets.gpg_private_key_base64 }}
110166 GPG_PASSPHRASE : ${{ secrets.gpg_passphrase }}
111- PFX_CERTIFICATE_BASE64 : ${{ secrets.pfx_certificate_base64 }} # base64 encoded
167+ PFX_CERTIFICATE_BASE64 : ${{ secrets.pfx_certificate_base64 }}
112168 PFX_PASSPHRASE : ${{ secrets.pfx_passphrase }}
113169 GPG_MAIL : ' infrastructure-eng@newrelic.com'
114170 NR_RELEASE_TAG : ${{ inputs.tag_name }}
115171 GORELEASER_CURRENT_TAG : ${{ inputs.tag_name }}
116172 SKIP_WINDOWS_SIGN : ${{ env.SKIP_WINDOWS_SIGN }}
117173
118174 - name : Upload assets to pipeline
119- uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
175+ uses : actions/upload-artifact@v4
120176 with :
121177 retention-days : 1
122178 name : built-binaries-${{ inputs.tag_name }}
@@ -130,10 +186,10 @@ jobs:
130186 needs : build
131187 if : ${{ ! inputs.skip_sign }}
132188 steps :
133- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
189+ - uses : actions/checkout@v4
134190
135191 - name : Download built binaries
136- uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
192+ uses : actions/download-artifact@v4
137193 with :
138194 name : built-binaries-${{ inputs.tag_name }}
139195 path : ./artifacts
@@ -144,4 +200,4 @@ jobs:
144200 ./build/scripts/windows-exec-sign/verify-signature.ps1 -Executables @(
145201 "./artifacts/dist/newrelic-agent-control-windows_x86_64-pc-windows-msvc/newrelic-agent-control.exe",
146202 "./artifacts/dist/newrelic-agent-control-cli-windows_x86_64-pc-windows-msvc/newrelic-agent-control-cli.exe"
147- )
203+ )
0 commit comments