小编Jif*_*ueb的帖子

如何修复 Github Actions dotnet 发布工作流程错误:构建解决方案时不支持“--output”选项

dotnet 发布工作流任务的工作方式发生了一些变化。我们使用这个非常简单的 yaml 脚本已经有一段时间了。

name: Publish to staging server

env:
  AZURE_WEBAPP_NAME: 'my-dotnet-webapp'
  AZURE_SLOT_NAME: 'staging'
  GITHUB_PUBLISH_SECRET: ${{ secrets.AZURE_DEPLOYMENTSLOT_STAGING }}
  AZURE_WEBAPP_PACKAGE_PATH: '.'
  DOTNET_VERSION: '7.0.0' 

on:
  push:
    branches:
      - staging
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up .NET Core
        uses: actions/setup-dotnet@v3
        with:
          dotnet-version: ${{ env.DOTNET_VERSION }}

      - name: Set up dependency caching for faster builds
        uses: actions/cache@v3
        with:
          path: ~/.nuget/packages
          key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
          restore-keys: |
            ${{ runner.os }}-nuget-

      - name: Build with dotnet
        run: …
Run Code Online (Sandbox Code Playgroud)

asp.net-core github-actions

5
推荐指数
1
解决办法
1889
查看次数

标签 统计

asp.net-core ×1

github-actions ×1