mirror of
https://github.com/wp-statistics/GeoLite2-City.git
synced 2025-12-29 22:22:18 +00:00
Add automated database update workflow
- Runs every Tuesday & Friday at 06:00 UTC - Downloads latest MaxMind GeoLite2-City database - Auto-bumps version and publishes to npm - Updates README with last update date
This commit is contained in:
32
.github/workflows/npm-publish.yml
vendored
32
.github/workflows/npm-publish.yml
vendored
@@ -1,22 +1,30 @@
|
||||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||
# This workflow publishes to npm when changes are pushed manually
|
||||
# Note: The update-database.yml workflow handles automatic updates and publishing
|
||||
|
||||
name: Node.js Package
|
||||
name: Publish to npm
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- 'README.md'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
# Skip if the commit was made by github-actions (to avoid duplicate publishes)
|
||||
if: github.actor != 'github-actions[bot]'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 12
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
- uses: JS-DevTools/npm-publish@v1
|
||||
with:
|
||||
token: ${{ secrets.NPM_TOKEN }}
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user