Skip to content

Commit

Permalink
Create publish-windows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xyz1396 authored Mar 6, 2024
1 parent 0cf9d6f commit d2b6ff5
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/publish-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: publish-windows

on:
push:
branches:
- main
pull_request:
branches: [ master ]
release:
types: [ created ]
workflow_dispatch:

env:
DOTNET_VERSION: '6.0.x' # The .NET SDK version to use

jobs:
publish:

runs-on: windows-latest

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

- name: Install dependencies
run: dotnet restore

- name: Prepare build
run: |
mkdir release
- name: Build
run: |
dotnet build --configuration Release --no-restore
dotnet publish -c Release -o . -r win-x64 --self-contained true /p:PublishSingleFile=true /p:PublishReadyToRun=true /p:PublishTrimmed=true
cp Raxport.exe release/Raxport.exe
# cp README.md release/README.md
- name: Upload build artificats
uses: actions/upload-artifact@v2
with:
name: Raxport-windows
path: release/*

- name: Upload binaries to the release
uses: svenstaro/upload-release-action@v2
# if: ${{ github.event_name == 'release' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: release/*
overwrite: true
file_glob: true

0 comments on commit d2b6ff5

Please sign in to comment.