simple-icons/.github/workflows/release.yml
Eric Cornelissen c7221a0797
Use Personal Access token in release.yml (#4211)
Update release.yml, which is the workflow that creates release PRs and
merges them when approved, to use a Personal Access Token instead of
the standard GITHUB_TOKEN. I choose to name it RELEASE_TOKEN.

This change ensures that GitHub Actions workflows are triggered when
an action is performed by the Automated releases workflow. This is
needed because the publishing to NPM and the creation of a new GitHub
release should happen when there is a commit on `master`. If the release
PR is merged by the workflow using GITHUB_TOKEN, no GitHub Actions
workflows would be triggered.

Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com>
2020-12-02 12:19:05 +01:00

17 lines
489 B
YAML

name: Automated releases
on:
pull_request_review:
types: [submitted]
schedule:
# "At 00:00 on Sunday" (https://crontab.guru/once-a-week)
- cron: "0 0 * * 0"
jobs:
release:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request_review' && contains(github.event.pull_request.labels.*.name, 'release')) || github.event_name == 'schedule'
steps:
- uses: simple-icons/release-action@master
with:
repo-token: ${{ secrets.RELEASE_TOKEN }}