Allow adding additional assets (#230) #546
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests and release | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
PROJECT_FOLDER: "qgispluginci" | |
PYTHON_VERSION_RELEASE: "3.8" | |
QGISPLUGINCI_VERSION: ${{ github.ref_name }} | |
jobs: | |
tests: | |
name: "Tests" | |
uses: ./.github/workflows/test.yml | |
secrets: inherit | |
build-python-wheel: | |
name: "🐍 Python Wheel" | |
uses: ./.github/workflows/wheel.yml | |
secrets: inherit | |
release-gh: | |
name: "Release on tag 🚀" | |
runs-on: ubuntu-latest | |
needs: [build-python-wheel, tests] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Retrieve artifact from Python build | |
uses: actions/download-artifact@v3 | |
with: | |
name: python_wheel | |
path: dist/ | |
- name: Create/update release on GitHub | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
allowUpdates: true | |
artifacts: "builds**/*" | |
generateReleaseNotes: true | |
omitNameDuringUpdate: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-pypi: | |
name: "🐍 Release on PyPI" | |
runs-on: ubuntu-latest | |
needs: [build-python-wheel, tests] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Retrieve artifact from Python build | |
uses: actions/download-artifact@v3 | |
with: | |
name: python_wheel | |
path: dist/ | |
# -- FROM HERE, A TAG IS REQUIRED --- | |
- name: Deploy to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Create/update release on GitHub | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
allowUpdates: true | |
artifacts: "dist/*.tar.gz" | |
generateReleaseNotes: true | |
omitNameDuringUpdate: true | |
token: ${{ secrets.GITHUB_TOKEN }} |