Skip to content

Commit

Permalink
CI自动发布
Browse files Browse the repository at this point in the history
  • Loading branch information
JWJUN233233 committed Sep 2, 2023
1 parent f39d339 commit 1393472
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/CI-Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI-Build
on:
workflow_dispatch:
push:
branches: [ "**" ]

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
compile-flags: "-c Release"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test
run: dotnet test MinecraftLaunch.csproj
test_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test
run: dotnet build MinecraftLaunch.csproj
build:
runs-on: ubuntu-latest
needs: [test, test_build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: dotnet build MinecraftLaunch.csproj ${{ env.compile-flags }}
- name: Publish
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: MinecraftLaunch.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
27 changes: 27 additions & 0 deletions .github/workflows/CI-Check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI-Check
on:
workflow_dispatch:
push:
branches: [ "**" ]
pull_request:
types:
- opened
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test
run: dotnet test MinecraftLaunch.csproj
test_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test
run: dotnet build MinecraftLaunch.csproj

0 comments on commit 1393472

Please sign in to comment.