2022-03-29 08:58:24 +00:00
|
|
|
on:
|
2022-03-29 08:31:09 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '0 18 * * *'
|
|
|
|
name: Update
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
name: Update
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-31 07:45:33 +00:00
|
|
|
permissions:
|
2022-04-06 12:19:32 +00:00
|
|
|
contents: write
|
2022-03-31 07:45:33 +00:00
|
|
|
packages: write
|
2022-03-29 08:31:09 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2022-03-30 09:05:40 +00:00
|
|
|
- name: Update data
|
2022-03-31 07:45:33 +00:00
|
|
|
run: php update.php
|
2022-03-29 08:31:09 +00:00
|
|
|
- name: Get current date
|
|
|
|
uses: josStorer/get-current-time@v2
|
|
|
|
id: current-time
|
|
|
|
with:
|
|
|
|
# Versioning is current date
|
|
|
|
format: "YYYY.M.D"
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
2022-03-29 08:58:24 +00:00
|
|
|
id: commit
|
2022-03-29 08:31:09 +00:00
|
|
|
with:
|
|
|
|
commit_message: Update Electron Fingerprints
|
2022-04-18 12:09:07 +00:00
|
|
|
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
|
2022-03-29 08:31:09 +00:00
|
|
|
file_pattern: hashes/*.json lookup/*.json
|
2022-03-29 08:58:24 +00:00
|
|
|
status_options: '--untracked-files=no'
|
2022-03-31 07:45:33 +00:00
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
registry-url: 'https://npm.pkg.github.com'
|
|
|
|
- name: NPM Publish
|
2022-03-29 08:58:24 +00:00
|
|
|
run: |
|
2022-04-29 19:02:11 +00:00
|
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config user.name "github-actions[bot]"
|
2022-04-30 11:14:01 +00:00
|
|
|
# Pre and post version scripts in package.json
|
2022-03-29 08:58:24 +00:00
|
|
|
npm version "v${{ steps.current-time.outputs.formattedTime }}"
|
2022-05-07 04:47:56 +00:00
|
|
|
gh release create "v${{ steps.current-time.outputs.formattedTime }}" --notes "v${{steps.current-time.outputs.formattedTime}}" ./lookup/*.json
|
2022-03-31 07:45:33 +00:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-05-04 19:31:59 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-04-08 06:03:29 +00:00
|
|
|
if: steps.commit.outputs.changes_detected == 'true'
|