RAGECOOP-V/.github/workflows/nightly-build.yaml

100 lines
3.6 KiB
YAML
Raw Normal View History

2022-06-06 17:53:03 +08:00
name: Nightly-build
2022-06-06 17:49:54 +08:00
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
2022-06-06 18:32:02 +08:00
runs-on: windows-latest
2022-06-06 17:49:54 +08:00
strategy:
matrix:
2022-06-06 17:53:03 +08:00
dotnet-version: ['6.0.x']
2022-06-06 17:49:54 +08:00
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
2022-06-06 20:34:05 +08:00
- name: Build client
2022-06-07 08:31:25 +08:00
run: dotnet build RageCoop.Client/RageCoop.Client.csproj --no-restore --configuration Release -o RageCoop.Client/bin/RageCoop
2022-06-06 20:34:05 +08:00
- name: Build server win-x64
2022-06-27 13:32:06 +08:00
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -r win-x64 -o RageCoop.Server/bin/win-x64 -c Release
2022-06-12 15:07:10 +08:00
- name: Build server linux-x64
2022-06-27 13:32:06 +08:00
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-x64 -o RageCoop.Server/bin/linux-x64 -c Release
2022-06-12 15:07:10 +08:00
- name: Build server linux-arm
2022-06-27 13:32:06 +08:00
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-arm -o RageCoop.Server/bin/linux-arm -c Release
2022-06-27 14:07:13 +08:00
2022-06-27 13:56:42 +08:00
- uses: vimtor/action-zip@v1
2022-06-06 20:07:57 +08:00
with:
2022-06-27 13:56:42 +08:00
files: RageCoop.Client/bin
dest: RageCoop.Client.zip
2022-06-27 14:07:13 +08:00
- uses: vimtor/action-zip@v1
2022-06-06 20:34:05 +08:00
with:
2022-06-27 14:07:13 +08:00
files: RageCoop.Server/bin/win-x64
dest: RageCoop.Server-win-x64.zip
- uses: vimtor/action-zip@v1
2022-06-12 15:07:10 +08:00
with:
2022-06-27 14:07:13 +08:00
files: RageCoop.Server/bin/linux-x64
dest: RageCoop.Server-linux-x64.zip
- uses: vimtor/action-zip@v1
2022-06-12 15:07:10 +08:00
with:
2022-06-27 14:07:13 +08:00
files: RageCoop.Server/bin/linux-arm
dest: RageCoop.Server-linux-arm.zip
2022-06-27 13:49:16 +08:00
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
2022-06-27 13:56:42 +08:00
asset_path: RageCoop.Client.zip
2022-06-27 16:00:19 +08:00
asset_name: RageCoop.Client.zip
2022-06-27 13:49:16 +08:00
asset_content_type: application/zip
max_releases: 7
2022-06-27 14:07:13 +08:00
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Server-win-x64.zip
2022-06-27 16:00:19 +08:00
asset_name: RageCoop.Server-win-x64.zip
2022-06-27 14:07:13 +08:00
asset_content_type: application/zip
max_releases: 7
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Server-linux-x64.zip
2022-06-27 16:00:19 +08:00
asset_name: RageCoop.Server-linux-x64.zip
2022-06-27 14:07:13 +08:00
asset_content_type: application/zip
max_releases: 7
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Server-linux-arm.zip
2022-06-27 16:00:19 +08:00
asset_name: RageCoop.Server-linux-arm.zip
2022-06-27 14:07:13 +08:00
asset_content_type: application/zip
max_releases: 7
2022-06-06 20:07:57 +08:00
- uses: actions/checkout@v2