Automated Releases #186
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated Releases | |
on: workflow_dispatch | |
# This Workflow is triggered through the GitHub API: | |
# curl -X Post \ | |
# -H "Authorization: Bearer <token>" \ | |
# -d '{"ref":"master"}' \ | |
# https://api.github.com/repos/simple-icons/simple-icons-website/actions/workflows/auto-release.yml/dispatches | |
# Replacing <token> by a personal access token with scope `public_repo` | |
jobs: | |
auto-release: | |
name: Automated release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.BOT_APP_ID }} | |
private-key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
# Ensure we are checked out on the master branch | |
ref: master | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Update simple-icons | |
id: update | |
run: | | |
newVersion="$(node scripts/bump-simpleicons.js)" | |
echo "NEW_VERSION=$newVersion" >> $GITHUB_OUTPUT | |
- name: Commit updates | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Update simple-icons to ${{ steps.update.outputs.NEW_VERSION }} | |
commit_user_name: 'simple-icons[bot]' | |
commit_user_email: 'simple-icons[bot]@users.noreply.github.com' | |
commit_author: 'simple-icons[bot] <simple-icons[bot]@users.noreply.github.com>' |