ci: Refactor packaging and upload artifacts for all platforms (#7858) #2662
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: lint | |
| on: | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize] | |
| branches: | |
| - main | |
| - feature/* | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.label.name || github.event.pull_request.number || github.sha }} @ ${{ github.event.label.name && github.event.pull_request.number || github.event.action }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| lint: | |
| name: Pre-Commit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Install pre-commit | |
| run: | | |
| sudo apt update | |
| sudo apt install python3 gn pipx | |
| pipx install pre-commit | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # GitHub's actions/checkout action, by default, checks out the merge commit when | |
| # a pull request event triggers a workflow. This merge commit represents the state | |
| # of the code as if the pull request had been merged into the base branch. | |
| # Setting fetch-depth to 2 effectively gets a merge commit (i.e. HEAD) and the | |
| # HEAD commit from the base branch (i.e. HEAD~1). | |
| fetch-depth: 2 | |
| - name: Run pre-commit | |
| run: | | |
| pre-commit install --hook-type pre-commit --hook-type pre-push | |
| pre-commit run --show-diff-on-failure --color=always --from-ref HEAD~1 --to-ref HEAD | |
| check-bug-id: | |
| name: Bug ID Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Bug ID Check | |
| # v2 | |
| uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee | |
| with: | |
| accessToken: ${{ secrets.GITHUB_TOKEN }} | |
| pattern: '^(Bug|Fixed|Issue): \d+$' | |
| flags: 'gm' | |
| error: 'PR title or description should include at least one bug ID.' |