diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index 2ff3708..0e417bc 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -14,7 +14,7 @@ on: windows-file: description: "Windows Version File" type: string - default: ".github/files/win-version.yaml" + default: "assets/win-version.yaml" source-file: description: "Source File" type: string @@ -133,6 +133,7 @@ jobs: extract: true - name: "Windows Installer - Inno Setup" + if: ${{ matrix.os == 'windows-latest' }} env: version: ${{ inputs.version }} shell: pwsh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 64d5661..5d9391c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ env: jobs: pyinstaller: name: "PyInstaller" - if: ${{ !github.event.release.prerelease }} + #if: ${{ !github.event.release.prerelease }} uses: ./.github/workflows/pyinstaller.yaml secrets: inherit with: @@ -42,7 +42,7 @@ jobs: name: "Publish" runs-on: ubuntu-latest timeout-minutes: 5 - needs: [build] + needs: [build, pyinstaller] permissions: contents: write @@ -156,21 +156,6 @@ jobs: name: ${{ env.name }} prerelease: ${{ github.event.release.prerelease }} - - name: "Send Failure Notification" - if: ${{ failure() }} - uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - - virustotal: - name: "VirusTotal Scan" - runs-on: ubuntu-latest - needs: [pyinstaller, release] - timeout-minutes: 5 - if: ${{ github.event_name == 'release' }} - - steps: - name: "VirusTotal" uses: cssnr/virustotal-action@master continue-on-error: true @@ -179,3 +164,10 @@ jobs: vt_api_key: ${{ secrets.VT_API_KEY }} update_release: true collapsed: true + + - name: "Send Failure Notification" + if: ${{ failure() }} + uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.gitignore b/.gitignore index f8e497f..aa49f4e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ coverage.xml /tests/files /tests/fake.json *.spec +win-version.txt diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..04994ff --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +.github/pull_request_template.md +package-lock.json diff --git a/.prettierrc.json b/.prettierrc.json index bfa3342..f4f5ac9 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,4 @@ { - "trailingComma": "es5", "semi": false, "singleQuote": true, "printWidth": 90, diff --git a/README.md b/README.md index 152802d..8b8ff2b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![PyPI Version](https://img.shields.io/pypi/v/sharex-cli?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/sharex-cli/) [![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/sharex-cli?logo=github)](https://github.com/cssnr/sharex-cli/releases) [![TOML Python Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcssnr%2Fsharex-cli%2Frefs%2Fheads%2Fmaster%2Fpyproject.toml&query=%24.project.requires-python&logo=python&logoColor=white&label=python)](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme) +[![GitHub Downloads](https://img.shields.io/github/downloads/cssnr/sharex-cli/total?logo=github&label=downloads)](https://github.com/cssnr/sharex-cli/releases/latest) [![PyPI Downloads](https://img.shields.io/pypi/dm/sharex-cli?logo=socialblade&logoColor=white)](https://pypistats.org/packages/sharex-cli) [![Pepy Total Downloads](https://img.shields.io/pepy/dt/sharex-cli?logo=rolldown&logoColor=white&label=total)](https://clickpy.clickhouse.com/dashboard/sharex-cli) [![Codecov](https://codecov.io/gh/cssnr/sharex-cli/graph/badge.svg?token=A8NDHZ393X)](https://codecov.io/gh/cssnr/sharex-cli) @@ -78,6 +79,7 @@ curl https://i.jpillora.com/cssnr/sharex-cli! | bash See [jpillora/installer](https://github.com/jpillora/installer) for more details. Alternatively, you can manually download a release for your system. +- [Windows Installer](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-installer.exe) _amd64_ - [Windows x86_64](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-amd64.zip) _amd64_ - [macOS Apple Intel](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-amd64.zip) _amd64_ - [macOS Apple Silicon](https://github.com/cssnr/sharex-cli/releases/latest/download/macos-arm64.zip) _arm64_ diff --git a/.github/files/win-version.yaml b/assets/win-version.yaml similarity index 100% rename from .github/files/win-version.yaml rename to assets/win-version.yaml diff --git a/docs/index.md b/docs/index.md index 28a0cfa..b20cb0c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,6 +8,7 @@ icon: lucide/rocket [![PyPI Version](https://img.shields.io/pypi/v/sharex-cli?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/sharex-cli/) [![TOML Python Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcssnr%2Fsharex-cli%2Frefs%2Fheads%2Fmaster%2Fpyproject.toml&query=%24.project.requires-python&logo=python&logoColor=white&label=python)](https://github.com/cssnr/sharex-cli?tab=readme-ov-file#readme) +[![GitHub Downloads](https://img.shields.io/github/downloads/cssnr/sharex-cli/total?logo=github&label=downloads)](https://github.com/cssnr/sharex-cli/releases/latest) [![PyPI Downloads](https://img.shields.io/pypi/dm/sharex-cli?logo=socialblade&logoColor=white)](https://pypistats.org/packages/sharex-cli) [![Pepy Total Downloads](https://img.shields.io/pepy/dt/sharex-cli?logo=rolldown&logoColor=white&label=total)](https://clickpy.clickhouse.com/dashboard/sharex-cli) [![Codecov](https://codecov.io/gh/cssnr/sharex-cli/graph/badge.svg?token=A8NDHZ393X)](https://codecov.io/gh/cssnr/sharex-cli) diff --git a/docs/snippets/install.md b/docs/snippets/install.md index 0402110..9b15ba3 100644 --- a/docs/snippets/install.md +++ b/docs/snippets/install.md @@ -23,3 +23,6 @@ ``` 1. For more details see the [Install Guide](cli.md#binary-release). + +Windows users can download the [Windows Installer.exe](https://github.com/cssnr/sharex-cli/releases/latest/download/windows-installer.exe). +Alternatively, you can manually [download a release](https://github.com/cssnr/sharex-cli/releases). diff --git a/pyproject.toml b/pyproject.toml index 07e159d..52eacf3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,7 @@ extend-exclude = [".github"] select = ["E4", "E7", "E9", "F", "B", "Q"] [tool.scripts] -win-version = "uv run pyivf-make_version --source-format yaml --metadata-source .github/files/win-version.yaml --outfile win-version.txt" +win-version = "uv run pyivf-make_version --source-format yaml --metadata-source assets/win-version.yaml --outfile win-version.txt" pyinstaller = "uv run pyinstaller -n sharex -i docs/favicon.ico src/app.py" pathmgr = [ "mkdir dist || echo dist dir exists",