2021-04-08 03:15:11 +03:00
|
|
|
name: Create Release Pull Request
|
2020-12-14 16:06:01 +03:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# "At 00:00 on Sunday" (https://crontab.guru/once-a-week)
|
|
|
|
- cron: "0 0 * * 0"
|
|
|
|
|
|
|
|
jobs:
|
2021-03-03 13:57:33 +03:00
|
|
|
release-pr:
|
2020-12-14 16:06:01 +03:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-03 13:57:33 +03:00
|
|
|
outputs:
|
|
|
|
did-create-pr: ${{ steps.release.outputs.did-create-pr }}
|
|
|
|
new-version: ${{ steps.release.outputs.new-version }}
|
2020-12-14 16:06:01 +03:00
|
|
|
steps:
|
2021-01-15 23:47:00 +03:00
|
|
|
- uses: simple-icons/release-action@master
|
2021-03-03 13:57:33 +03:00
|
|
|
id: release
|
2021-01-15 23:47:00 +03:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-03-03 13:57:33 +03:00
|
|
|
version-bump:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: release-pr
|
|
|
|
if: needs.release-pr.outputs.did-create-pr == 'true'
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
# Ensure we are checked out on the develop branch
|
|
|
|
ref: develop
|
|
|
|
- name: Bump version
|
|
|
|
run: node ./scripts/bump-version.js "${{ needs.release-pr.outputs.new-version }}"
|
|
|
|
- name: Update slugs table
|
|
|
|
run: node ./scripts/build-slugs-table.js
|
|
|
|
- name: Commit version bump
|
2021-05-05 13:35:03 +03:00
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4.11.0
|
2021-03-03 13:57:33 +03:00
|
|
|
with:
|
|
|
|
commit_message: version bump
|
|
|
|
commit_user_name: GitHub Actions
|
|
|
|
commit_user_email: actions@github.com
|
|
|
|
commit_author: GitHub Actions <actions@github.com>
|