Skip to content

docs: add PR template (#85) #138

docs: add PR template (#85)

docs: add PR template (#85) #138

name: Publish (Release)
on:
push:
branches:
- main
- next
jobs:
publish-release:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: 8BitJonny/[email protected]
id: PR
with:
filterOutClosed: true
sha: ${{ github.event.pull_request.head.sha }}
- name: Change Node.js Version
uses: actions/[email protected]
with:
node-version: 18.16.0
- name: Cache node_modules
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- run: npm ci
- name: Tests
run: npm run test
- name: Check build
run: npm run build
- run: |
git fetch --tags --unshallow
npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PR: ${{ steps.PR.outputs.number }}