mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Separate workers into different OSes
This commit is contained in:
parent
444652da12
commit
240efdc493
3 changed files with 145 additions and 101 deletions
39
.github/workflows/dotnet.yml
vendored
39
.github/workflows/dotnet.yml
vendored
|
@ -5,13 +5,38 @@ name: .NET
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
|
||||
- name: Publish for Windows x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os win -p:PublishSingleFile=true -o publish/win-x64
|
||||
|
||||
- name: Upload Windows x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Windows-x64
|
||||
path: publish/win-x64/**
|
||||
if-no-files-found: error
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -29,8 +54,6 @@ jobs:
|
|||
|
||||
- name: Publish for Linux x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os linux -p:PublishSingleFile=true -o publish/linux-x64
|
||||
- name: Publish for Windows x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os win -p:PublishSingleFile=true -o publish/win-x64
|
||||
|
||||
- name: Upload Linux x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
|
@ -38,9 +61,3 @@ jobs:
|
|||
name: Linux-x64
|
||||
path: publish/linux-x64/**
|
||||
if-no-files-found: error
|
||||
- name: Upload Windows x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Windows-x64
|
||||
path: publish/win-x64/**
|
||||
if-no-files-found: error
|
||||
|
|
69
.github/workflows/main.yml
vendored
69
.github/workflows/main.yml
vendored
|
@ -1,69 +0,0 @@
|
|||
name: Publish release draft
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag
|
||||
required: true
|
||||
prerelease:
|
||||
description: Prerelease
|
||||
type: boolean
|
||||
generatenotes:
|
||||
description: Generate release notes
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
|
||||
- name: Publish for Linux x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os linux -p:PublishSingleFile=true -o publish/linux-x64
|
||||
- name: Publish for Windows x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os win -p:PublishSingleFile=true -o publish/win-x64
|
||||
|
||||
- name: Upload Linux x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Linux-x64
|
||||
path: publish/linux-x64/**
|
||||
if-no-files-found: error
|
||||
- name: Upload Windows x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Windows-x64
|
||||
path: publish/win-x64/**
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Zip Linux x64
|
||||
run: 7z a capy64-linux-x64.zip publish/linux-x64/**
|
||||
- name: Zip Windows x64
|
||||
run: 7z a capy64-windows-x64.zip publish/win-x64/**
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.12.0
|
||||
with:
|
||||
commit: ${{ github.ref_name }}
|
||||
tag: ${{ inputs.tag }}
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: true
|
||||
artifacts: "capy64-linux-x64.zip,capy64-windows-x64.zip"
|
||||
draft: true
|
||||
generateReleaseNotes: ${{ inputs.generatenotes }}
|
||||
makeLatest: true
|
||||
prerelease: ${{ inputs.prerelease }}
|
96
.github/workflows/publish.yml
vendored
Normal file
96
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
name: Publish release draft
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag
|
||||
required: true
|
||||
prerelease:
|
||||
description: Prerelease
|
||||
type: boolean
|
||||
generatenotes:
|
||||
description: Generate release notes
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
release-windows:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
|
||||
- name: Publish for Windows x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os win -p:PublishSingleFile=true -o publish/win-x64
|
||||
|
||||
- name: Upload Windows x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Windows-x64
|
||||
path: publish/win-x64/**
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Zip Windows x64
|
||||
run: 7z a capy64-windows-x64.zip publish/win-x64/**
|
||||
|
||||
release-linux:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
|
||||
- name: Publish for Linux x64
|
||||
run: dotnet publish Capy64/Capy64.csproj -c Release --no-self-contained -a x64 --os linux -p:PublishSingleFile=true -o publish/linux-x64
|
||||
|
||||
- name: Upload Linux x64 artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Linux-x64
|
||||
path: publish/linux-x64/**
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Zip Linux x64
|
||||
run: 7z a capy64-linux-x64.zip publish/linux-x64/**
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.12.0
|
||||
with:
|
||||
commit: ${{ github.ref_name }}
|
||||
tag: ${{ inputs.tag }}
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: true
|
||||
artifacts: "capy64-linux-x64.zip,capy64-windows-x64.zip"
|
||||
draft: true
|
||||
generateReleaseNotes: ${{ inputs.generatenotes }}
|
||||
makeLatest: true
|
||||
prerelease: ${{ inputs.prerelease }}
|
Loading…
Reference in a new issue