]> git.phdru.name Git - cookiecutter.git/blobdiff - project_template/.github/workflows/test-publish.yaml
Feat(GHActions): Publish wheels to Github Releases
[cookiecutter.git] / project_template / .github / workflows / test-publish.yaml
index 5242df79e87329da66a7d1e185562516992641db..a66ab6e2cd4dc016d94dddc1359df20b576c4c89 100644 (file)
@@ -1,7 +1,7 @@
 name: Test, build, publish
 
 # Run tests (all branches),
-# for tags build wheels, publish wheels to PyPI.
+# for tags build wheels, publish wheels to PyPI and Github Releases.
 
 on: [push, pull_request]
 
@@ -75,3 +75,17 @@ jobs:
         env:
           TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
           TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
+      - name: Publish wheel to Releases
+        uses: ncipollo/release-action@v1
+        with:
+          artifacts: "dist/*"
+          allowUpdates: true
+          bodyFile: "LATEST-CHANGES.rst"
+          omitBodyDuringUpdate: true
+          omitNameDuringUpdate: true
+          omitPrereleaseDuringUpdate: true
+          prerelease: false
+          replacesArtifacts: false
+          skipIfReleaseExists: false
+          updateOnlyUnreleased: false
+        if: ${{ startsWith(github.ref, 'refs/tags/') }}