feat: improved synthesis format #10
Workflow file for this run
This file contains hidden or 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: Publish to PyPI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: write # Required for creating releases | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Build frontend | |
| run: | | |
| cd frontend | |
| npm ci | |
| npm run build | |
| - name: Install build tools | |
| run: pip install build | |
| - name: Build package | |
| run: python -m build --wheel | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| # Extract the section for this version from CHANGELOG.md | |
| VERSION="${{ steps.version.outputs.VERSION }}" | |
| # Get content between this version header and the next --- or ## [ | |
| NOTES=$(awk "/^## \[${VERSION}\]/{flag=1; next} /^---$|^## \[/{flag=0} flag" CHANGELOG.md) | |
| # Handle multi-line output | |
| echo "NOTES<<EOF" >> $GITHUB_OUTPUT | |
| echo "$NOTES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: v${{ steps.version.outputs.VERSION }} | |
| body: | | |
| ## What's Changed | |
| ${{ steps.changelog.outputs.NOTES }} | |
| ## Installation | |
| ```bash | |
| pip install quorum-cli==${{ steps.version.outputs.VERSION }} | |
| ``` | |
| See [CHANGELOG.md](https://github.com/Detrol/quorum-cli/blob/main/CHANGELOG.md) for full history. | |
| files: dist/*.whl |