-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
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 |