Skip to content

Commit 342579b

Browse files
committed
Update publish
1 parent b912ffe commit 342579b

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/publish.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,36 @@ on:
44
push
55

66
jobs:
7-
publish-asserts:
8-
runs-on: ubuntu-latest
7+
publish-assets:
98
permissions: write-all
109

10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, windows-latest]
13+
binary: [shell-language]
14+
include:
15+
- os: windows-latest
16+
platform-name: x86_64-pc-windows
17+
executable-extension: ".exe"
18+
- os: ubuntu-latest
19+
platform-name: x86_64-unknown-linux
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
env:
24+
LEVEL: debug
25+
GH_RELEASE: assets
26+
1127
steps:
1228
- uses: actions/checkout@v4
29+
1330
- name: Build binary
14-
working-directory: shell-language
31+
working-directory: ${{ matrix.binary }}
1532
run: cargo build
33+
1634
- name: Publish binary
17-
working-directory: shell-language
18-
run: gh release upload assets ./target/debug/shell-language#shell-language --clobber
35+
working-directory: ${{ matrix.binary }}
36+
run: gh release upload $GH_RELEASE ./target/$LEVEL/${{ matrix.binary }}${{ matrix.executable-extension }}#${{ matrix.binary }}-${{ matrix.platform-name }}${{ matrix.executable-extension }} --clobber
37+
shell: bash
1938
env:
2039
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)