Allow updating machine connections of a switch #507
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: build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| push: | |
| branches: | |
| - main | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| go: | |
| name: Go | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v5 | |
| - name: Check spelling | |
| uses: crate-ci/typos@master | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: false | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| args: -D protogetter --timeout=5m | |
| python: | |
| name: Python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Make tag | |
| run: | | |
| [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=v0.0.0.dev-${{ github.event.number }}" >> $GITHUB_ENV || true | |
| [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true | |
| [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=v0.0.0-rc0" >> $GITHUB_ENV || true | |
| - name: Package | |
| run: | | |
| cd python | |
| python -m pip install setuptools wheel | |
| python setup.py sdist bdist_wheel | |
| env: | |
| VERSION: ${{ env.tag }} | |
| - name: Publish to Test PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.test_pypi_password }} | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| packages-dir: python/dist | |
| if: ${{ github.event_name != 'release' }} | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.pypi_password }} | |
| packages-dir: python/dist | |
| if: ${{ github.event_name == 'release' }} |