Skip to content

Commit f02b3f9

Browse files
committed
chore(just): add windows release target
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
1 parent 71771fc commit f02b3f9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
shopt -s extglob
7070
if [[ "$GITHUB_EVENT_NAME" == pull_request ]]; then
7171
echo version="0.0.0-test.${GITHUB_SHA:0:7}"
72-
echo archs='["amd64"]'
72+
echo archs='["amd64", "arm64", "arm"]'
73+
echo oses='["linux", "windows"]'
7374
exit 0
7475
fi >> "$GITHUB_OUTPUT"
7576
if ! [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$ ]]; then
@@ -78,6 +79,7 @@ jobs:
7879
fi
7980
( echo version="${VERSION#v}"
8081
echo archs='["amd64", "arm64", "arm"]'
82+
echo oses='["linux", "windows"]'
8183
) >> "$GITHUB_OUTPUT"
8284
8385
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -93,6 +95,7 @@ jobs:
9395
9496
outputs:
9597
archs: ${{ steps.meta.outputs.archs }}
98+
oses: ${{ steps.meta.outputs.oses }}
9699
version: ${{ steps.meta.outputs.version }}
97100
package: ${{ github.event_name == 'workflow_dispatch' || steps.changed.outputs.any_changed == 'true' }}
98101
profile: ${{ inputs.profile || 'release' }}
@@ -121,12 +124,15 @@ jobs:
121124
122125
package:
123126
needs: meta
124-
if: needs.meta.outputs.package == 'true'
125127

126128
strategy:
127129
matrix:
128130
arch: ${{ fromJson(needs.meta.outputs.archs) }}
131+
os: ${{ fromJson(needs.meta.outputs.oses) }}
129132
libc: [gnu] # musl
133+
exclude:
134+
- os: windows
135+
arch: [arm64, arm]
130136

131137
# If we're not actually building on a release tag, don't short-circuit on
132138
# errors. This helps us know whether a failure is platform-specific.
@@ -147,12 +153,12 @@ jobs:
147153
with:
148154
key: ${{ matrix.arch }}
149155
- run: just fetch
150-
- run: just arch=${{ matrix.arch }} libc=${{ matrix.libc }} rustup
151-
- run: just arch=${{ matrix.arch }} libc=${{ matrix.libc }} profile=${{ needs.meta.outputs.profile }} build
152-
- run: just arch=${{ matrix.arch }} libc=${{ matrix.libc }} profile=${{ needs.meta.outputs.profile }} package
156+
- run: just arch=${{ matrix.arch }} libc=${{ matrix.libc }} os=${{ matrix.os }} rustup
157+
- run: just arch=${{ matrix.arch }} libc=${{ matrix.libc }} os=${{ matrix.os } profile=${{ needs.meta.outputs.profile }} build
158+
- run: just arch=${{ matrix.arch }} libc=${{ matrix.libc }} os=${{ matrix.os } profile=${{ needs.meta.outputs.profile }} package
153159
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1
154160
with:
155-
name: ${{ matrix.arch }}-artifacts
161+
name: ${{ matrix.arch }}-${{ matrix.os }}-artifacts
156162
path: target/package/*
157163

158164
publish:

0 commit comments

Comments
 (0)