Skip to content

Commit fc18bd8

Browse files
committed
try to set variables separately for windows
1 parent 8adc44a commit fc18bd8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/base-ci-goreleaser.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ jobs:
214214
if-no-files-found: error
215215

216216
- name: Prepare variables
217-
if: matrix.GOOS == 'linux' || matrix.GOOS == 'windows'
217+
if: matrix.GOOS == 'linux'
218218
id: prep
219219
run: |
220220
# Find version number and types of built artifacts
@@ -227,6 +227,20 @@ jobs:
227227
# Find binary path
228228
echo "binary-path=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq -r 'map(select(any(.type; contains("Binary")))) | .[].path' )" >> "$GITHUB_OUTPUT"
229229
230+
- name: Prepare variables (Windows)
231+
if: matrix.GOOS == 'windows'
232+
id: prep
233+
run: |
234+
# Find version number and types of built artifacts
235+
echo "version=$(cat ./distributions/${{ inputs.distribution }}/dist/**/metadata.json | jq -r '.version')" >> $env:GITHUB_OUTPUT
236+
echo "types=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq '[.[].type]' | tr -d '\n' )" >> $env:GITHUB_OUTPUT
237+
238+
# Find GOOS and GOARCH
239+
echo "arch=${{ matrix.GOOS }}-${{ matrix.GOARCH }}" >> $env:GITHUB_OUTPUT
240+
241+
# Find binary path
242+
echo "binary-path=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq -r 'map(select(any(.type; contains("Binary")))) | .[].path' )" >> $env:GITHUB_OUTPUT
243+
230244
- name: Print version and target
231245
if: matrix.GOOS == 'linux' || matrix.GOOS == 'windows'
232246
run: |

0 commit comments

Comments
 (0)