-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.14 KB
/
update-downloads-urls.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
43
44
45
46
47
48
name: Update Downloads URLs
on:
workflow_dispatch:
inputs:
version:
type: string
description: "Version (semver) for the latest release."
default: "0.0.1"
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- uses: actions/cache@v3
with:
path: |
~/.npm
~/.nvm
node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
run: |
npm ci
- name: Update downloads.json
run: |
npm run update-downloads-urls ${{ env.VERSION }}
- name: Commit & push
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git commit -am "GitHub Action: Automatic update for v${{ env.VERSION }} of downloads.json"
git push