Merge pull request #28 from remnawave:development #23
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 Python Package | |
| on: | |
| push: | |
| branches: | |
| - production | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| if: ${{ !contains(github.event.head_commit.message, '[skip publish]') }} | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Pull latest changes | |
| if: ${{ !contains(github.event.head_commit.message, '[skip publish]') }} | |
| run: git pull origin production --tags --force | |
| - name: Set up Python | |
| if: ${{ !contains(github.event.head_commit.message, '[skip publish]') }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| if: ${{ !contains(github.event.head_commit.message, '[skip publish]') }} | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build wheel | |
| - name: Build package | |
| if: ${{ !contains(github.event.head_commit.message, '[skip publish]') }} | |
| run: python -m build | |
| - name: Publish package | |
| if: ${{ !contains(github.event.head_commit.message, '[skip publish]') }} | |
| uses: pypa/[email protected] |