Automatically publish to self NPM repository
This commit is contained in:
parent
001ebeff46
commit
1bb9925110
|
@ -1,5 +1,4 @@
|
|||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 18 * * *'
|
||||
name: Update
|
||||
|
@ -7,13 +6,15 @@ jobs:
|
|||
update:
|
||||
name: Update
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Update data
|
||||
id: update
|
||||
run: make all
|
||||
run: php update.php
|
||||
- name: Get current date
|
||||
uses: josStorer/get-current-time@v2
|
||||
id: current-time
|
||||
|
@ -27,9 +28,16 @@ jobs:
|
|||
commit_author: actions-user <65916846+actions-user@users.noreply.github.com>
|
||||
file_pattern: hashes/*.json lookup/*.json
|
||||
status_options: '--untracked-files=no'
|
||||
- name: NPM Version Bump
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
- name: NPM Publish
|
||||
run: |
|
||||
npm test
|
||||
npm version "v${{ steps.current-time.outputs.formattedTime }}"
|
||||
git push origin --tags
|
||||
npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: ${{ steps.commit.output.changes_detected}}
|
||||
# TODO: NPM Publish
|
|
@ -40,3 +40,8 @@ The schema for these files is fairly intuitive:
|
|||
"sha1_hash": ["list", "of", "versions"]
|
||||
}
|
||||
```
|
||||
|
||||
## GitHub Actions
|
||||
|
||||
1. Tests are run on all supported Node versions
|
||||
2. Hashes are automatically updated daily, and a new release is triggered in case of new electron releases.
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/captn3m0/electron-fingerprints/issues"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
},
|
||||
"homepage": "https://github.com/captn3m0/electron-fingerprints#readme",
|
||||
"devDependencies": {
|
||||
"semver": "^7.3.5"
|
||||
|
|
Loading…
Reference in New Issue