Skip to content

remove runtime from publish command #4

remove runtime from publish command

remove runtime from publish command #4

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: BingBackground Release
on:
push:
tags: [ "v*" ]
jobs:
build:
runs-on: windows-latest
env:
PROJECT_PATH: BingBackground\BingBackground\BingBackground.csproj
OUTPUT_PATH: Publish
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore $env:PROJECT_PATH
- name: Publish
run: dotnet publish $env:PROJECT_PATH --no-restore -c Release --self-contained false -p:PublishSingleFile=true --version-suffix ${{ github.run_number }} --output $env:OUTPUT_PATH
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: BingBackground ${{ github.ref }}
draft: false
prerelease: false
- name: Archive Release
uses: thedoctor0/zip-release@0.7.1
with:
directory: $env:OUTPUT_PATH
path: $env:OUTPUT_PATH
type: 'zip'
filename: 'release.zip'
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: $env:OUTPUT_PATH\release.zip
asset_name: BingBackground.${{ github.ref }}.zip
asset_content_type: application/zip