Skip to content

Test platform-specific steps #1

Test platform-specific steps

Test platform-specific steps #1

name: Platform-specific steps
on:
push:
branches: [ "platform-specific-step" ]
pull_request:
branches: [ "platform-specific-step" ]
jobs:
build:
timeout-minutes: 30
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- name: Set up on Windows
if: runner.os == 'Windows'
shell: bash
run: echo "🪟"
- name: Set up on Linux
if: runner.os == 'Linux'
run: echo "🐧"
- name: Set up on macOS
if: runner.os == 'macOS'
run: echo "🍎"
- name: Foo
shell: bash
run: |
case $RUNNER_OS in
Windows)
echo "W"
;;
Linux)
echo "L"
;;
macOS)
echo "M"
;;
esac
- name: Bar
shell: bash
run: |
map_Windows="W" ; map_Linux="L" ; map_macOS="M"
c="$(eval echo '$'map_$RUNNER_OS)"
echo $c