Update dotnet-build.yml #22
Workflow file for this run
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: ColorMC构建 | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- 'releases/**' | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- '*' | |
jobs: | |
build-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 设置.NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: 更新源码 | |
shell: bash | |
working-directory: ./ | |
run: | | |
chmod a+x ./build/update.sh | |
./build/update.sh | |
- name: 构建 | |
shell: bash | |
working-directory: ./ | |
run: | | |
chmod a+x ./build/build-ubuntu.sh | |
./build/build-ubuntu.sh | |
- name: 上传 ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "colormc-ubuntu" | |
path: build_out/ | |
build-macos: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 设置.NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: 更新源码 | |
shell: bash | |
working-directory: ./ | |
run: | | |
chmod a+x ./build/update.sh | |
./build/update.sh | |
- name: 构建 | |
shell: bash | |
working-directory: ./ | |
run: | | |
chmod a+x ./build/build-macos.sh | |
./build/build-macos.sh | |
- name: 上传 ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "colormc-macos" | |
path: build_out/ | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 设置.NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: 更新源码 | |
shell: cmd | |
working-directory: ./ | |
run: ./build/update.cmd | |
- name: 构建 | |
shell: cmd | |
working-directory: ./ | |
run: ./build/build-windows.cmd | |
- name: 上传 ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "colormc-windows" | |
path: build_out/ |