Update actions/upload-artifact action to v4 #226
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macOS | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
macos-test-build-release-xcode: | |
runs-on: macos-13 | |
strategy: | |
matrix: | |
xcode: ["14.1", "15.0"] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Select Xcode ${{ matrix.xcode }} | |
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
- name: Test | |
run: swift test | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
- name: Upload test artifacts | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }} | |
path: | | |
.build/**/*.json | |
.build/**/*.xctest | |
- name: Build Release | |
run: swift build -c release | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
- name: Upload build artifacts | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }} | |
path: | | |
*.lcov | |
.build/*.yaml | |
.build/**/*.a | |
.build/**/*.so | |
.build/**/*.dylib | |
.build/**/*.dSYM | |
.build/**/*.json | |
- name: Zip XCFramework | |
run: | | |
zip -q -9 -r SDL2.xcframework.zip SDL2.xcframework | |
echo "`swift package compute-checksum SDL2.xcframework.zip`" > SDL2.xcframework.checksum.txt | |
- name: Publish XCFramework | |
uses: actions/[email protected] | |
with: | |
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }} | |
path: | | |
SDL2.xcframework.zip | |
SDL2.xcframework.checksum.txt | |
macos-test-build-release-xcode-legacy: | |
runs-on: macos-12 | |
strategy: | |
matrix: | |
xcode: ["13.4.1"] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Select Xcode ${{ matrix.xcode }} | |
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
- name: Test | |
run: swift test | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
- name: Upload test artifacts | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }} | |
path: | | |
.build/**/*.json | |
.build/**/*.xctest | |
- name: Build Release | |
run: swift build -c release | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
- name: Upload build artifacts | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }} | |
path: | | |
*.lcov | |
.build/*.yaml | |
.build/**/*.a | |
.build/**/*.so | |
.build/**/*.dylib | |
.build/**/*.dSYM | |
.build/**/*.json |