electron-fingerprints/.github/workflows/update.yml

46 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2022-03-29 08:58:24 +00:00
on:
schedule:
- cron: '0 18 * * *'
name: Update
jobs:
update:
name: Update
runs-on: ubuntu-latest
permissions:
2022-04-06 12:19:32 +00:00
contents: write
packages: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
2022-03-30 09:05:40 +00:00
- name: Update data
run: php update.php
- 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
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>'
file_pattern: hashes/*.json lookup/*.json
2022-03-29 08:58:24 +00:00
status_options: '--untracked-files=no'
- 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
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'