2021-04-08 02:15:11 +02:00
|
|
|
name: Create Release Pull Request
|
2020-12-14 15:06:01 +02:00
|
|
|
on:
|
2021-06-15 23:50:14 +02:00
|
|
|
workflow_dispatch:
|
2020-12-14 15:06:01 +02:00
|
|
|
schedule:
|
|
|
|
# "At 00:00 on Sunday" (https://crontab.guru/once-a-week)
|
|
|
|
- cron: "0 0 * * 0"
|
|
|
|
|
2021-06-15 23:50:14 +02:00
|
|
|
# This Workflow can be triggered manually through the GitHub UI or API. For the
|
|
|
|
# API use the following request:
|
|
|
|
# curl -X POST \
|
|
|
|
# -H "Authorization: Bearer <token>" \
|
|
|
|
# -d '{"ref":"develop"}' \
|
|
|
|
# https://api.github.com/repos/simple-icons/simple-icons/actions/workflows/create-release.yml/dispatches
|
|
|
|
# Replacing <token> by a personal access token with scope `public_repo`
|
|
|
|
|
2020-12-14 15:06:01 +02:00
|
|
|
jobs:
|
2021-03-03 12:57:33 +02:00
|
|
|
release-pr:
|
2020-12-14 15:06:01 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-03 12:57:33 +02:00
|
|
|
outputs:
|
|
|
|
did-create-pr: ${{ steps.release.outputs.did-create-pr }}
|
|
|
|
new-version: ${{ steps.release.outputs.new-version }}
|
2020-12-14 15:06:01 +02:00
|
|
|
steps:
|
2021-01-15 22:47:00 +02:00
|
|
|
- uses: simple-icons/release-action@master
|
2021-03-03 12:57:33 +02:00
|
|
|
id: release
|
2021-01-15 22:47:00 +02:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-03-03 12:57:33 +02: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
|
2021-05-07 19:55:06 +02:00
|
|
|
run: node ./scripts/release/bump-version.js "${{ needs.release-pr.outputs.new-version }}"
|
2021-05-05 23:29:49 +02:00
|
|
|
- name: Update major version in CDN URLs
|
2021-05-07 19:55:06 +02:00
|
|
|
run: node ./scripts/release/update-cdn-urls.js
|
2021-03-03 12:57:33 +02:00
|
|
|
- name: Update slugs table
|
2021-05-07 19:55:06 +02:00
|
|
|
run: node ./scripts/release/update-slugs-table.js
|
2021-03-03 12:57:33 +02:00
|
|
|
- name: Commit version bump
|
2021-05-05 12:35:03 +02:00
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4.11.0
|
2021-03-03 12:57:33 +02:00
|
|
|
with:
|
|
|
|
commit_message: version bump
|
2021-06-24 12:14:49 +02:00
|
|
|
commit_user_name: "github-actions[bot]"
|
|
|
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
|
|
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|