Update actions/upload-artifact to v4 #23
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: Build and Distribute Dynamic Library (Windows) | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
working-directory: "source" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Swift | |
uses: compnerd/gha-setup-swift@main | |
with: | |
branch: swift-6.0.3-release | |
tag: 6.0.3-RELEASE | |
- name: Build dynamic library | |
run: | | |
swift build -c release | |
- name: Create libraries directory | |
run: New-Item -Path libraries -ItemType Directory | |
- name: Copy dynamic library | |
run: Copy-Item .build\release\*.dll libraries\ | |
- name: Create zip archive | |
run: Compress-Archive -Path libraries\* -DestinationPath windows-build.zip | |
shell: pwsh | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dynamic-libraries | |
path: ./source/windows-build.zip |