-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 2 KB
/
test-determine-release-url.yml
File metadata and controls
56 lines (54 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on:
workflow_call:
jobs:
test-with-default-arguments:
strategy:
matrix:
os:
- image: ubuntu-latest
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-x86_64-unknown-linux-gnu
- image: windows-latest
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-x86_64-pc-windows-msvc.exe
- image: macos-latest
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-x86_64-apple-darwin
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
- uses: ./determine-release-url
id: run-action
with:
binary-name: my-binary
owner: example-org
repository: example-app
- uses: armakuni/github-actions/assert-equals@v0.19.6
name: Check url
with:
expected: ${{ matrix.os.expected-url }}
actual: ${{ steps.run-action.outputs.url }}
test-with-arguments:
strategy:
matrix:
os:
- image: ubuntu-latest
expected-url: https://github.com/demo-org/demo-app/releases/latest/download/program-linux
- image: windows-latest
expected-url: https://github.com/demo-org/demo-app/releases/latest/download/program-windows.exe
- image: macos-latest
expected-url: https://github.com/demo-org/demo-app/releases/latest/download/program-macos
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
- uses: ./determine-release-url
id: run-action
with:
binary-name: program
owner: demo-org
repository: demo-app
linux-suffix: linux
windows-suffix: windows
macos-suffix: macos
- uses: armakuni/github-actions/assert-equals@v0.19.6
name: Check url
with:
expected: ${{ matrix.os.expected-url }}
actual: ${{ steps.run-action.outputs.url }}