Merge pull request #25 from AdmiralCurtiss/github-actions-update #50
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: .NET | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies for program | |
run: dotnet restore HyoutaToolsCLI/HyoutaToolsCLI.csproj | |
- name: Build program | |
run: dotnet build --configuration Release --no-restore HyoutaToolsCLI/HyoutaToolsCLI.csproj | |
- name: Restore dependencies for tests | |
run: dotnet restore HyoutaToolsTests/HyoutaToolsTests.csproj | |
- name: Build tests | |
run: dotnet build --configuration Release --no-restore HyoutaToolsTests/HyoutaToolsTests.csproj | |
- name: Test | |
run: dotnet test --configuration Release --no-build --verbosity normal HyoutaToolsTests/HyoutaToolsTests.csproj | |
- name: Publish | |
run: dotnet publish --configuration Release --no-build HyoutaToolsCLI/HyoutaToolsCLI.csproj --output _publish | |
- run: mv LICENSE LICENSE_HyoutaTools | |
- run: mv utf_tab-sharp/LICENSE LICENSE_utf_tab-sharp | |
- run: mv zlib-sharp/LICENSE LICENSE_zlib-sharp | |
- run: mv HyoutaUtils/LICENSE LICENSE_HyoutaUtils | |
- run: mv LICENSE* _publish | |
- run: mv README.md _publish | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: HyoutaToolsCLI | |
path: _publish | |
if-no-files-found: error | |
compression-level: 9 |