diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml index 7142d4c..42067af 100644 --- a/.github/workflows/create.yml +++ b/.github/workflows/create.yml @@ -72,6 +72,7 @@ jobs: PrepareManylinux: name: prepare-manylinux + if: startsWith(github.ref, 'refs/tags/') strategy: matrix: python: @@ -98,6 +99,9 @@ jobs: Release: name: release + needs: + - PrepareRelease + - PrepareManylinux runs-on: 'ubuntu-latest' steps: - uses: actions/download-artifact@master @@ -105,8 +109,33 @@ jobs: name: dist path: dist - - name: create release - run: .github/actions/scripts/release.sh + # - name: create release + # run: .github/actions/scripts/release.sh + # env: + # TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + # GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Test Release Asset + id: create_test_release + if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-test') + uses: softprops/action-gh-release@78c309e + with: + prerelease: true + files: | + dist/*.whl + dist/*.zip + dist/*.tar.gz env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_OAUTH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Release Asset + id: upload-release-asset + if: startsWith(github.ref, 'refs/tags/') && ! endsWith(github.ref, '-test') + uses: softprops/action-gh-release@78c309e + with: + files: | + dist/*.whl + dist/*.zip + dist/*.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}