all repos — hastyscribe @ 77df440b28a1e4abddab2f5205abfb83e8245bbc

A professional markdown compiler.

Updated workflow.
h3rald h3rald@h3rald.com
Thu, 31 Aug 2023 17:23:04 +0000
commit

77df440b28a1e4abddab2f5205abfb83e8245bbc

parent

420cf626b48b7fe3ec0cd456f78f633fdaca74fa

1 files changed, 26 insertions(+), 8 deletions(-)

jump to
M .github/workflows/add-artifacts-to-current-release.yml.github/workflows/add-artifacts-to-current-release.yml

@@ -52,7 +52,7 @@ - name: Update %PATH%

run: | echo "${HOME}/.nimble/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "${GITHUB_WORKSPACE}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + echo "C:\msys64\hastyscribegw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append if: matrix.os == 'windows-latest' # Install the Nim compiler

@@ -80,33 +80,51 @@ run: |

nimble build -v -y -d:release --mm:refc --opt:size if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest' + + # UPX compress (*nix) + - name: UPX + uses: svenstaro/upx-action@v2 + with: + files: | + hastyscribe + args: --best --force + if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' + + # UPX compress (Windows) + - name: UPX + uses: svenstaro/upx-action@v2 + with: + files: | + hastyscribe.exe + args: --best --force + if: matrix.os == 'windows-latest' + # Retrieve ID and Name of the current (draft) release - - name: 'Get current release' + - name: "Get current release" id: current-release uses: InsonusK/get-latest-release@v1.0.1 with: myToken: ${{ github.token }} - exclude_types: 'release' + exclude_types: "release" view_top: 1 # Package the resulting Linux/macOS binary - name: Create artifact (Linux, macOS) - shell: bash - run: zip hastyscribe_${{steps.current-release.outputs.tag_name}}_${{steps.os.outputs.id}}_x64.zip hastyscribe + run: zip hastyscribe_${{steps.current-release.outputs.tag_name}}_${{steps.os.outputs.os}}_x64.zip hastyscribe if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - + # Package the resulting Windows binary - name: Create artifact (Windows) run: Compress-Archive -Path hastyscribe.exe -DestinationPath hastyscribe_${{steps.current-release.outputs.tag_name}}_windows_x64.zip if: matrix.os == 'windows-latest' # Upload artifacts to current draft release - - name: 'Upload to current release' + - name: "Upload to current release" uses: xresloader/upload-to-github-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - file: 'hastyscribe_v*.zip' + file: "hastyscribe_v*.zip" overwrite: true tag_name: ${{steps.current-release.outputs.tag_name}} release_id: ${{steps.current-release.outputs.id }}