Skip to content

Update nightly.yml

Update nightly.yml #8

Workflow file for this run

name: Update nightly release
on:
push:
branches:
- master
# schedule:
# - cron: '0 0 * * *'
jobs:
update-nightly-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Setup npm cache
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci --no-progress || npm install --no-progress
- name: Lint source
run: npm run lint
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PUPPETEER_SKIP_DOWNLOAD: true
- name: Build source code
run: npm run build
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: nightly
name: Nightly Build
body: Automated nightly build for branch ${{ github.ref }}
draft: false
prerelease: true
allowUpdates: true