diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53f42f6..f847e5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,14 +43,19 @@ jobs: run: | mkdir dist cabal install exe:gcwdr-exe --install-method=copy --overwrite-policy=always --installdir=dist + - if: matrix.os == 'windows-latest' - name: Set extension to .exe on Windows - run: echo "EXT=.exe" >> $GITHUB_ENV + name: Set Windows binary path name + run: | + chcp 65001 + mv ./dist/gcwdr-exe.exe ./dist/gcwdr-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe + echo "BINARY_PATH=./dist/gcwdr-${{ runner.os }}-ghc-${{ matrix.ghc }}.exe" >> $env:GITHUB_ENV - - name: Set binary path name + - if: matrix.os != 'windows-latest' + name: Set Unix binary path name run: | - mv ./dist/gcwdr-exe${{ env.EXT }} ./dist/gcwdr-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }} - echo "BINARY_PATH=./dist/gcwdr-${{ runner.os }}-ghc-${{ matrix.ghc }}${{ env.EXT }}" >> $GITHUB_ENV + mv ./dist/gcwdr-exe ./dist/gcwdr-${{ runner.os }}-ghc-${{ matrix.ghc }} + echo "BINARY_PATH=./dist/gcwdr-${{ runner.os }}-ghc-${{ matrix.ghc }}" >> $GITHUB_ENV - name: Compress binary uses: svenstaro/upx-action@2.0.1 diff --git a/src/Entry/Read.hs b/src/Entry/Read.hs index 8076c5a..6f4fc87 100644 --- a/src/Entry/Read.hs +++ b/src/Entry/Read.hs @@ -150,7 +150,6 @@ gnrtPublic cfg = do let articles = addGlb glbRes <$> runAtclModule (postObjs <> pageObjs <> diaryObjs) -- Generate htmls. gnrtSitemap outputPath (siteUrl cfg) articles - logWT Info $ show articles gnrtHtmls outputPath themePath articles -- Posts and pages T.writeFile (outputDir cfg "index.html") indexHtml -- Index createDirectoryIfMissing True (outputDir cfg "diary/")