Merge pull request #1 from Rashicom/Dev #10
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: Meow Package Publish action | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - run: echo "Setup project.." | |
| - name: Cloning repository | |
| uses: actions/checkout@v2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{matrix.python-version}} | |
| - name: Install Hatch | |
| run: pip install hatch | |
| - name: Install twin | |
| run: pip install twine | |
| - name: Run tests | |
| run: hatch run test:pytest | |
| - name: Build package | |
| run: hatch build | |
| - name: Test package | |
| run: twine check dist/* | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| id-token: write | |
| steps: | |
| - run: echo "Setup project.." | |
| - name: Cloning repository | |
| uses: actions/checkout@v2 | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.12 | |
| - name: Install Hatch | |
| run: pip install hatch | |
| - name: Install twin | |
| run: pip install twine | |
| - name: Build package | |
| run: hatch build | |
| - name: Test build using twine | |
| run: twine check dist/* |