Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into v2
  • Loading branch information
BigBang1112 committed Sep 1, 2024
2 parents 24649a7 + e73d5ff commit 2318d59
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pre-alpha-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Pre-Alpha Publish CLI

on:
workflow_dispatch:

env:
PROJECT_NAME: NationsConverterCLI

jobs:
build:
runs-on: ubuntu-latest
name: Build

env:
ZIP_SUFFIX: .zip

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Publish
run: dotnet publish Src/${{ env.PROJECT_NAME }}
-c Release
-r win-x64
-o build/${{ env.PROJECT_NAME }}
-p:PublishTrimmed=true
-p:PublishSingleFile=true
-p:EnableCompressionInSingleFile=true
--self-contained

- name: Zip to ${{ env.PROJECT_NAME }}${{ env.ZIP_SUFFIX }}
uses: thedoctor0/zip-release@main
with:
directory: build
path: ${{ env.PROJECT_NAME }}
filename: ../${{ env.PROJECT_NAME }}${{ env.ZIP_SUFFIX }}

- name: Calculate SHA256 (Linux)
run: |
sha256sum "${{ env.PROJECT_NAME }}${{ env.ZIP_SUFFIX }}" | awk '{print $1}' | tee >(cat) > ${{ env.PROJECT_NAME }}${{ env.ZIP_SUFFIX }}.hash.txt
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.PROJECT_NAME }}${{ env.ZIP_SUFFIX }}
if-no-files-found: error

0 comments on commit 2318d59

Please sign in to comment.