Release #8
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 | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| jobs: | |
| create-release: | |
| runs-on: | |
| labels: ubuntu-24.04-16core | |
| permissions: | |
| contents: write | |
| outputs: | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +'%Y.%m.%d')" >> "$GITHUB_OUTPUT" | |
| - name: Install dependencies | |
| run: | | |
| ./.github/install_clang_version.sh 19 | |
| - name: "Run `bazel build`" | |
| run: | | |
| bazel build -c opt //tools:all | |
| - name: Ensure binaries can run | |
| shell: bash | |
| run: | | |
| bazel-bin/tools/heir-opt --help | |
| bazel-bin/tools/heir-translate --help | |
| bazel-bin/tools/heir-lsp --help | |
| [ -f bazel-bin/external/edu_berkeley_abc/abc ] | |
| - name: Create Release | |
| id: release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2 | |
| with: | |
| tag_name: v${{ steps.date.outputs.date }} | |
| generate_release_notes: true | |
| files: | | |
| bazel-bin/tools/heir-opt | |
| bazel-bin/tools/heir-translate | |
| bazel-bin/tools/heir-lsp | |
| bazel-bin/external/edu_berkeley_abc/abc | |
| lib/Transforms/YosysOptimizer/yosys/techmap.v | |
| monitor-wheels: | |
| runs-on: ubuntu-latest | |
| needs: create-release | |
| permissions: | |
| actions: read | |
| issues: write | |
| steps: | |
| - name: Wait for wheels workflow to complete | |
| id: wait_for_wheels | |
| uses: lewagon/wait-on-check-action@0dceb95e7c4cad8cc7422aee3885998f5cab9c79 # pin@v1.4.0 | |
| with: | |
| ref: ${{ needs.create-release.outputs.tag_name }} | |
| check-name: 'pypi_upload' | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| wait-interval: 60 | |
| allowed-conclusions: success,skipped,neutral | |
| continue-on-error: true | |
| - name: Create issue on failure | |
| if: steps.wait_for_wheels.outcome == 'failure' | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: `Wheels workflow failed for release ${{ needs.create-release.outputs.tag_name }}`, | |
| body: `The wheels workflow failed to complete successfully. Please check the workflow run for details: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}` | |
| }) |