Update to build the package only on commit to master. #2
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: Python build | |
| # Controls when the action will run. Triggers the workflow on: | |
| # * push on any branch. | |
| # * tag creation for tags beginning with a 'v' | |
| # * pull requests | |
| on: | |
| push: | |
| branches: ["*"] | |
| tags: ["v*"] | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| branches: ["*"] | |
| jobs: | |
| build-package: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Obtain prerequisite build tool | |
| run: | | |
| pip install 'capstone<5' | |
| - name: Run tests | |
| run: | | |
| make tests | |
| - name: Build package | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| make package | |
| - uses: actions/upload-artifact@v6 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| name: Package | |
| path: dist |