mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-07 08:21:57 +00:00
Prevents unintended bumps on the flake.lock and Yosys version on forks (provided the forks synchronize their main after this gets merged). Update version.yml to use the same style of `if` on the job, rather than on specific actions. Wheels will still build as a cron job, but won't try to upload if it's a fork.
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Bump version
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
bump-version:
|
|
if: github.repository == 'YosysHQ/Yosys'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: true
|
|
persist-credentials: false
|
|
- name: Take last commit
|
|
id: log
|
|
run: echo "message=$(git log --no-merges -1 --oneline)" >> $GITHUB_OUTPUT
|
|
- name: Bump version
|
|
if: ${{ !contains(steps.log.outputs.message, 'Bump version') }}
|
|
run: |
|
|
make bumpversion
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
git add Makefile
|
|
git commit -m "Bump version"
|
|
- name: Push changes # push the output folder to your repo
|
|
if: ${{ !contains(steps.log.outputs.message, 'Bump version') }}
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|