-
Notifications
You must be signed in to change notification settings - Fork 31
42 lines (40 loc) · 1.52 KB
/
auto-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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>'