Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #1
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, Test & Release | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup submodule | |
run: | | |
git submodule update --init --recursive | |
- name: Pull engine updates | |
uses: space-wizards/[email protected] | |
- name: Update Engine Submodules | |
run: | | |
cd RobustToolbox/ | |
git submodule update --init --recursive | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --property WarningLevel=${{ matrix.os == 'ubuntu-latest' && '4' || '0' }} --configuration Release --no-restore /m | |
- name: Content.Tests | |
shell: pwsh | |
run: | | |
$env:COMPlus_gcServer=1 | |
dotnet test --no-build Content.Tests/Content.Tests.csproj -v n | |
- name: Content.IntegrationTests | |
shell: pwsh | |
run: | | |
$env:COMPlus_gcServer=1 | |
dotnet test --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -v n | |
- name: Publish OpenDream | |
if: github.event_name == 'push' | |
run: dotnet run --project OpenDreamPackageTool --no-build --configuration Release -- --server --hybrid-acz --platform ${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }} --output output/ | |
- name: Publish DMCompiler | |
if: github.event_name == 'push' | |
run: dotnet publish DMCompiler -c Release -o output/DMCompiler_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }} | |
- name: Gzip releases | |
if: github.event_name == 'push' | |
run: | | |
tar -czvf output/DMCompiler_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}.tar.gz -C output DMCompiler_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }} | |
tar -czvf output/OpenDreamServer_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }}.tar.gz -C output OpenDreamServer_${{ matrix.os == 'windows-latest' && 'win-x64' || 'linux-x64' }} | |
- name: Upload artifact | |
if: github.event_name == 'push' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-${{ matrix.os }} | |
path: output/*.tar.gz | |
retention-days: 1 | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
path: artifacts | |
- name: Publish latest release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Development Build" | |
files: | | |
artifacts/*/*.tar.gz | |