|
31 | 31 | strategy: |
32 | 32 | fail-fast: false |
33 | 33 | matrix: |
34 | | - python: ['3.7', '3.8', '3.9', '3.10'] |
| 34 | + python: ['3.7', '3.8', '3.9', '3.10', '3.11'] |
35 | 35 |
|
36 | 36 | defaults: |
37 | 37 | run: |
|
76 | 76 | name: dftd4-python-${{ matrix.python }} |
77 | 77 | path: ./*.whl |
78 | 78 | retention-days: 5 |
| 79 | + |
| 80 | + release: |
| 81 | + needs: |
| 82 | + - sdist |
| 83 | + - manylinux |
| 84 | + runs-on: ubuntu-latest |
| 85 | + steps: |
| 86 | + - name: Download artifacts |
| 87 | + uses: actions/download-artifact@v2 |
| 88 | + with: |
| 89 | + path: ${{ github.workspace }} # This will download all files |
| 90 | + |
| 91 | + - name: Create SHA256 checksums |
| 92 | + run: | |
| 93 | + set -ex |
| 94 | + for output in dftd4*/dftd4*; do |
| 95 | + pushd $(dirname "$output") |
| 96 | + sha256sum $(basename "$output") | tee $(basename "$output").sha256 |
| 97 | + popd |
| 98 | + done |
| 99 | +
|
| 100 | + - name: Copy release artifacts |
| 101 | + run: | |
| 102 | + mkdir dist/ |
| 103 | + cp -v dftd4*/dftd4*.whl dftd4*/dftd4*.tar.gz dist/ |
| 104 | +
|
| 105 | + - name: Publish to Test PyPI |
| 106 | + if: ${{ github.event_name == 'release' }} |
| 107 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 108 | + with: |
| 109 | + user: __token__ |
| 110 | + password: ${{ secrets.TEST_PYPI_TOKEN }} |
| 111 | + repository_url: https://test.pypi.org/legacy/ |
| 112 | + |
| 113 | + - name: Upload assets |
| 114 | + uses: svenstaro/upload-release-action@v2 |
| 115 | + if: ${{ github.event_name == 'release' }} |
| 116 | + with: |
| 117 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 118 | + file: dftd4*/dftd4* |
| 119 | + file_glob: true |
| 120 | + tag: ${{ github.ref }} |
| 121 | + overwrite: true |
| 122 | + |
| 123 | + - name: Publish to PyPI |
| 124 | + if: ${{ github.event_name == 'release' }} |
| 125 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 126 | + with: |
| 127 | + user: __token__ |
| 128 | + password: ${{ secrets.PYPI_TOKEN }} |
0 commit comments