Skip to content

prerelease: activity pub files #71

prerelease: activity pub files

prerelease: activity pub files #71

Workflow file for this run

name: Publish
on:
push:
branches:
- main
- develop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: '16.14'
registry-url: 'https://registry.npmjs.org'
always-auth: true
- name: Cache Dependencies
id: cache
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Test
run: npm run lint
- name: Build
run: npm run build
# === `main` branch ===
- name: Publish to NPM
if: github.ref == 'refs/heads/main'
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Slack Notification
if: always()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: ipns-site-generator
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took