Skip to content

Merge pull request #1 from Github-Actions-Community/master #5

Merge pull request #1 from Github-Actions-Community/master

Merge pull request #1 from Github-Actions-Community/master #5

Workflow file for this run

name: Build, Test and maybe Publish
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- name: Build
run: npm install
publish:
name: Publish
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- name: Build
run: npm install
- name: Publish
uses: github-actions-community/merge-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}