chore(deps): bump docker/build-push-action from f2a1d5e99d037542a71f64918e516c093c6f3fc4 to 9e436ba9f2d7bcd1d038c8e55d039d37896ddc5d #229
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: Release | |
| permissions: | |
| contents: write | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| jobs: | |
| create_release: | |
| name: Create release | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') | |
| steps: | |
| - name: Create release | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| env: | |
| RELEASE_BRANCH: ${{ github.head_ref }} | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const tagName = `${process.env.RELEASE_BRANCH.split("/")[1]}`; | |
| await github.rest.git.createRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: `refs/tags/${tagName}`, | |
| sha: context.payload.pull_request.merge_commit_sha, | |
| }); | |
| await github.rest.repos.createRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| generate_release_notes: true, | |
| tag_name: tagName, | |
| }); | |
| build_artifacts: | |
| needs: create_release | |
| name: Build executables | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04-arm, ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Set tag | |
| env: | |
| RELEASE_BRANCH: ${{ github.head_ref }} | |
| run: | | |
| TAG_NAME=$(echo $RELEASE_BRANCH | cut -d "/" -f2) | |
| echo "tag_name=$TAG_NAME" >> "$GITHUB_ENV" | |
| shell: bash | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.tag_name }} | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install requirements | |
| run: | | |
| python -m pip install . | |
| python -m pip install -r scripts/build_requirements.txt | |
| - name: Build and upload executables | |
| run: python scripts/build.py -f -u | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |