fix: include more SIA groups #759
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: release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version tag for Docker image (e.g., 9.9.9-test)" | |
| required: false | |
| type: string | |
| push: | |
| branches: [main] | |
| tags: | |
| - "[0-9]*" | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| release: | |
| name: Semantic Release | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Create release environment | |
| run: | | |
| mkdir -p release-tools | |
| cd release-tools | |
| npm init -y | |
| - name: Install semantic-release dependencies | |
| working-directory: release-tools | |
| run: | | |
| npm install \ | |
| semantic-release \ | |
| conventional-changelog-conventionalcommits@^9 \ | |
| @semantic-release/commit-analyzer \ | |
| @semantic-release/release-notes-generator \ | |
| @semantic-release/changelog \ | |
| @semantic-release/exec \ | |
| @semantic-release/github \ | |
| @semantic-release/git \ | |
| semantic-release-replace-plugin | |
| - name: Show installed dependencies | |
| working-directory: release-tools | |
| run: | | |
| npm ls \ | |
| semantic-release \ | |
| @semantic-release/commit-analyzer \ | |
| @semantic-release/release-notes-generator \ | |
| conventional-changelog-conventionalcommits \ | |
| conventional-changelog \ | |
| conventional-changelog-writer \ | |
| --all | |
| - name: Test release | |
| if: github.event_name == 'pull_request' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| release-tools/node_modules/.bin/semantic-release --dry-run --no-ci | |
| - name: Release | |
| if: github.event_name == 'workflow_dispatch' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| run: | | |
| poetry config pypi-token.pypi "${PYPI_TOKEN}" | |
| release-tools/node_modules/.bin/semantic-release --ci | |
| docker-push: | |
| name: Push Docker image | |
| if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: alertadengue | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| - name: Extract version | |
| id: version | |
| shell: bash | |
| run: | | |
| if [ -n "${{ inputs.version }}" ]; then | |
| echo "tag=${{ inputs.version }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: | | |
| alertadengue/pysus:latest | |
| alertadengue/pysus:${{ steps.version.outputs.tag }} | |
| docs: | |
| name: Build docs | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| - name: Install dependencies | |
| run: | | |
| pip install poetry | |
| poetry config virtualenvs.create false | |
| poetry install --no-root --with docs | |
| - name: Build docs | |
| run: | | |
| cd docs | |
| make html | |
| wheels: | |
| name: Build wheel (${{ matrix.os }}) | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Extract version | |
| id: version | |
| shell: bash | |
| run: | | |
| echo "version=$(poetry version -s)" >> "$GITHUB_OUTPUT" | |
| - name: Build wheels | |
| run: poetry build | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pysus-${{ steps.version.outputs.version }}-${{ matrix.os }} | |
| path: dist/ | |
| if-no-files-found: error | |
| github-release: | |
| name: GitHub Release | |
| needs: wheels | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: pysus-*-* | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| generate_release_notes: true |