Skip to content

ci: fix pack zip

ci: fix pack zip #10

Workflow file for this run

name: Publish
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish Application
run: dotnet publish -c Release -r win-x64 --self-contained false
- name: Zip Published Files
run: |
Compress-Archive -Path D:\a\Nalai\Nalai\Nalai\bin\Release\net8.0-windows\win-x64\publish\* -DestinationPath "D:\a\Nalai_v${{ github.ref_name }}_win_x64.zip" -Force -Verbose
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Nalai-v${{ github.ref_name }}-win-x64
path: 'D:\a\Nalai_v${{ github.ref_name }}_win_x64.zip'
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false
- name: 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: 'D:\a\Nalai_v${{ github.ref_name }}_win_x64.zip'
asset_name: Nalai_v${{ github.ref_name }}_win_x64.zip
asset_content_type: application/zip