Release #22
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: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Release version (e.g., 1.2.3 or 1.2.3-rc1)" | |
| required: true | |
| type: string | |
| jobs: | |
| build-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies (optional) | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Set version | |
| id: ver | |
| run: | | |
| echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT | |
| - name: Build release artifacts | |
| run: | | |
| set -euo pipefail | |
| mkdir -p dist | |
| # Build list of include paths present in repo | |
| include=(LICENSE README.md requirements.txt config docker bin scripts sql src adoc system-catalog report) | |
| present=() | |
| for p in "${include[@]}"; do | |
| [ -e "$p" ] && present+=("$p") | |
| done | |
| # Source tarball excluding venv and dot dirs except .github | |
| tar --exclude-vcs \ | |
| --exclude=venv \ | |
| --exclude=.venv \ | |
| --exclude=.git \ | |
| --exclude='**/__pycache__' \ | |
| -czf dist/TAQO-${{ steps.ver.outputs.version }}.tar.gz \ | |
| -C . \ | |
| "${present[@]}" | |
| # Zip of SQL models only | |
| if [ -d sql ]; then (cd sql && zip -r ../dist/models-${{ steps.ver.outputs.version }}.zip .); fi | |
| - name: Generate checksums | |
| run: | | |
| cd dist | |
| sha256sum * > SHA256SUMS.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ inputs.version }} | |
| name: TAQO ${{ steps.ver.outputs.version }} | |
| draft: false | |
| prerelease: ${{ contains(inputs.version, 'rc') || contains(inputs.version, 'beta') }} | |
| files: | | |
| dist/TAQO-${{ steps.ver.outputs.version }}.tar.gz | |
| dist/models-${{ steps.ver.outputs.version }}.zip | |
| dist/SHA256SUMS.txt | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |