Skip to content

fix(NuGet.Config): be more precise about nuget package sources #238

fix(NuGet.Config): be more precise about nuget package sources

fix(NuGet.Config): be more precise about nuget package sources #238

Workflow file for this run

name: .NET
on: [push, pull_request]
jobs:
build-windows:
runs-on: windows-latest
env:
NUGET_CERT_REVOCATION_MODE: offline
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore -r win-x64
- name: Build
run: |
cd Scarab
dotnet publish --no-restore -r win-x64 -p:PublishSingleFile=true -p:Configuration=Release --self-contained true
cd ..
- name: Upload Binary
uses: actions/upload-artifact@v2
with:
name: Scarab-Windows
path: Scarab/bin/Release/net6.0/win-x64/publish/
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore -r linux-x64
- name: Build
run: |
cd Scarab
dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:Configuration=Release --self-contained true
cd ..
- name: Upload Binary
uses: actions/upload-artifact@v2
with:
name: Scarab-Linux
path: Scarab/bin/Release/net6.0/linux-x64/publish/
build-macos:
runs-on: macos-latest
env:
NUGET_CERT_REVOCATION_MODE: offline
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore -r osx-x64
- name: Build
run: |
cd Scarab
dotnet publish --no-restore -r osx-x64 -p:PublishSingleFile=true -p:Configuration=Release --self-contained true
cd ..
mkdir out
python3 make_app.py Scarab.app Scarab/bin/Release/net6.0/osx-x64/publish
- name: Upload Binary
uses: actions/upload-artifact@v2
with:
name: Scarab-MacOS
path: out/mac.zip
release:
needs: [build-macos, build-windows, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download artifacts
uses: actions/download-artifact@v4.1.7
with:
path: ./artifacts
- name: Zip
run: |
zip -jr windows.zip ./artifacts/Scarab-Windows/*
chmod +x ./artifacts/Scarab-Linux/Scarab
zip -jr linux.zip ./artifacts/Scarab-Linux/*
- name: Create release if a new tag is pushed
uses: softprops/action-gh-release@v1
with:
files: |
./windows.zip
./artifacts/Scarab-MacOS/mac.zip
./linux.zip