Skip to content

Node.js Package Update #225

Node.js Package Update

Node.js Package Update #225

Workflow file for this run

# 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
name: Node.js Package Update
on:
schedule:
- cron: '0 0 * * 0'
push:
branches:
- master
jobs:
publish-npm:
runs-on: self-hosted
strategy:
matrix:
node-version: [ 18.x ]
steps:
- uses: actions/checkout@v2
- uses: SpicyPizza/create-envfile@v1
with:
envkey_PG_DB_HOST: ${{secrets.pg_db_host}}
envkey_PG_DB_USER: ${{secrets.pg_db_user}}
envkey_PG_DB_PASS: ${{secrets.pg_db_pass}}
envkey_PG_DB_NAME: ${{secrets.pg_db_name}}
envkey_PG_DB_PORT: ${{secrets.pg_db_port}}
envkey_MYSQL_DB_HOST: ${{secrets.mysql_db_host}}
envkey_MYSQL_DB_USER: ${{secrets.mysql_db_user}}
envkey_MYSQL_DB_PASS: ${{secrets.mysql_db_pass}}
envkey_MYSQL_DB_NAME: ${{secrets.mysql_db_name}}
file_name: .env
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Weekly Update"
- run: git pull
- run: npm ci
- run: npm run build
- run: node dist/update-user-agents.js
- run: git add --all
- run: npm version patch -m "Updated user-agents. New package version is %s" -f
- run: git push
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}