Skip to content

Commit

Permalink
ci: fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
Icexbb committed Dec 7, 2024
1 parent 210677a commit a8eaff0
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ on:

env:
DOTNET_VERSION: '8.0.x' # The .NET SDK version to use
BUILD_DIR: 'Build'
BUILD_DIR: 'SekaiTools.Nightly'
RESOURCE_DIR: 'resource'
PROJECT_NAME: 'SekaiToolsGUI'
SEVEN_ZIP_EXE: './resource/vapourSynth/7z.exe'

jobs:
build:
Expand All @@ -27,14 +28,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get current date
id: date
run: echo "::set-output name=today::$(date +'%Y%m%d')"

- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Dotnet Build
run: |
dotnet restore ${{ env.PROJECT_NAME }}
dotnet build ${{ env.PROJECT_NAME }} --configuration Release --no-restore -o ${{ env.BUILD_DIR }}
- name: Sort Artifacts
run: |
cp -r ${{ env.RESOURCE_DIR }} ${{ env.BUILD_DIR }}
rm -r ${{ env.BUILD_DIR }}/runtimes/win-x86
rm -r ${{ env.BUILD_DIR }}/runtimes/win-arm64
rm -r ${{ env.BUILD_DIR }}/*.pdb
- run: dotnet build ${{ env.PROJECT_NAME }} --configuration Release --no-restore -o ${{ env.BUILD_DIR }}
- run: cp -r ${{ env.RESOURCE_DIR }} ${{ env.BUILD_DIR }}

- run: zip -r ${{ env.BUILD_DIR }}.zip ${{ env.BUILD_DIR }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_DIR }}.zip
name: SekaiTools.Nightly.${{ steps.date.outputs.today }}
path: ${{ env.BUILD_DIR }}

0 comments on commit a8eaff0

Please sign in to comment.