|
| 1 | +name: Build and Publish Packages |
| 2 | + |
| 3 | +on: |
| 4 | + release: |
| 5 | + types: [published] |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + |
| 10 | + |
| 11 | +jobs: |
| 12 | + build_and_publish_ubuntu: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v3 |
| 16 | + - name: Set up Python 3.10 |
| 17 | + uses: actions/setup-python@v3 |
| 18 | + with: |
| 19 | + python-version: '3.10' |
| 20 | + - name: Dependencies |
| 21 | + run: | |
| 22 | + pip install wheel twine |
| 23 | + - name: Add Rclone Binary File |
| 24 | + run: | |
| 25 | + mv linux/rclone pyrclone/rclone |
| 26 | + - name: Update Permissions |
| 27 | + run: | |
| 28 | + sudo chmod 755 pyrclone/rclone |
| 29 | + - name: Build And Package for Linux |
| 30 | + run: | |
| 31 | + make publish OS="manylinux1_x86_64" |
| 32 | + env: |
| 33 | + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 34 | + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 35 | + |
| 36 | + |
| 37 | + build_and_publish_windows: |
| 38 | + runs-on: windows-latest |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v3 |
| 41 | + - name: Set up Python 3.10 |
| 42 | + uses: actions/setup-python@v3 |
| 43 | + with: |
| 44 | + python-version: '3.10' |
| 45 | + - name: Dependencies |
| 46 | + run: | |
| 47 | + pip install wheel twine |
| 48 | + - name: Add Rclone Binary File |
| 49 | + run: | |
| 50 | + move win/rclone.exe pyrclone/rclone.exe |
| 51 | + - name: Build And Package for Windows |
| 52 | + run: | |
| 53 | + make publish OS="win_amd64" |
| 54 | + env: |
| 55 | + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 56 | + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 57 | + |
| 58 | + build_and_publish_mac: |
| 59 | + runs-on: macos-latest |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v3 |
| 62 | + - name: Set up Python 3.10 |
| 63 | + uses: actions/setup-python@v3 |
| 64 | + with: |
| 65 | + python-version: '3.10' |
| 66 | + - name: Dependencies |
| 67 | + run: | |
| 68 | + pip install wheel twine |
| 69 | + - name: Add Rclone Binary File |
| 70 | + run: | |
| 71 | + mv mac/rclone pyrclone/rclone |
| 72 | + - name: Update Permissions |
| 73 | + run: | |
| 74 | + sudo chmod 755 pyrclone/rclone |
| 75 | + - name: Build And Package for Mac |
| 76 | + run: | |
| 77 | + make publish OS="macosx_10_9_x86_64" |
| 78 | + env: |
| 79 | + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 80 | + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 81 | + |
0 commit comments