Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

pipeline

pipeline #324

Workflow file for this run

name: 'pipeline'
on:
workflow_dispatch:
repository_dispatch:
schedule:
# Runs "At 00:00 on every day-of-week from Sunday through Saturday." (see https://crontab.guru)
- cron: '0 0 * * 0-6'
permissions: read-all
jobs:
generate:
name: Run bindings generation
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pages: write
deployments: write
issues: write
security-events: write
steps:
- uses: actions/checkout@main
- name: Checkout wiki code
uses: actions/checkout@main
with:
repository: ${{github.repository}}.wiki
path: markdown/
- uses: denoland/setup-deno@main
with:
deno-version: vx.x.x
- uses: actions/setup-node@main
with:
registry-url: 'https://registry.npmjs.org'
node-version: 18
- name: Check if Vivid has new version
id: vividHasNewVersion
run: deno task newVivid >> $GITHUB_OUTPUT
- name: Generate bindings
if: steps.vividHasNewVersion.outputs.result == 'true'
run: |
deno task generate
cp -f ./README.md ./package/README.md
cd ./package
npm install
npm run build
echo registry=https://registry.npmjs.org/ > .npmrc
echo //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} >> .npmrc
echo always-auth=true >> .npmrc
npm publish --access public
echo registry=https://npm.pkg.github.com/ > .npmrc
echo //npm.pkg.github.com/:_authToken=${{ github.token }} >> .npmrc
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push to wiki
run: |
cd markdown
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git pull && git commit -m "Add changes" || echo "Nothing to push" && git push