diff --git a/.github/workflows/update-yosys.yml b/.github/workflows/update-yosys.yml new file mode 100644 index 0000000..9311f1a --- /dev/null +++ b/.github/workflows/update-yosys.yml @@ -0,0 +1,48 @@ +on: + push: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' + +name: Update Yosys (and OSS Cad Suite) + +# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs +jobs: + update: + name: Update OSS Cad Suite Version + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + # Yesterday, because CAD suite versions are made at the end of the + # night. + - name: Update OSS CAD Suite version file (and save new value) + run: | + date -d today +%Y-%m-%d > ci/oss-cad-suite-version + echo >> $GITHUB_ENV OSS_CAD_SUITE_DATE=$(cat ci/oss-cad-suite-version) + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.PAT }} + commit-message: Update OSS CAD Suite version to ${{ env.OSS_CAD_SUITE_DATE }} + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: false + branch: update-yosys-${{ env.OSS_CAD_SUITE_DATE }} + delete-branch: true + title: Update OSS CAD Suite version to ${{ env.OSS_CAD_SUITE_DATE }} + body: | + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + labels: | + automated pr + assignees: cr1901 + reviewers: cr1901 + draft: false