diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4042c8..10f9ba8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,9 @@ jobs: build: runs-on: ubuntu-latest environment: release - permissions: - contents: write - id-token: write + # permissions: + # contents: write + # id-token: write steps: - uses: actions/checkout@v4 - uses: pdm-project/setup-pdm@v3 @@ -19,12 +19,40 @@ jobs: name: dist path: dist if-no-files-found: error - - name: Release - uses: softprops/action-gh-release@v2 - if: startswith(github.ref, 'refs/tags/v') - with: - files: dist/* - generate_release_notes: true + # - name: Release + # uses: softprops/action-gh-release@v2 + # if: startswith(github.ref, 'refs/tags/v') + # with: + # files: dist/* + # generate_release_notes: true - name: Publish to PyPI if: startswith(github.ref, 'refs/tags/v') run: pdm publish --no-build + pyinstaller: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyinstaller + - name: Package using pyinstaller + run: pyinstaller -Fn batchlink src/batchlink/cli.py + - name: Rename for Linux + if: matrix.os == 'ubuntu-latest' + run: mv dist/batchlink dist/batchlink-linux64 + - name: Rename for Windows + if: matrix.os == 'windows-latest' + run: mv dist/batchlink dist/batchlink-win64.exe + - name: Rename for macOS + if: startsWith(matrix.os, 'macos') + run: mv dist/batchlink dist/batchlink-macos-$(uname -m) + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist + if-no-files-found: error diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 0000000..49aeba3 --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,11 @@ +name: Typos + +on: [push] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Spell check with typos + uses: crate-ci/typos@v1.24.1