Skip to content

chore(main): release 3.1.0 (#28) #52

chore(main): release 3.1.0 (#28)

chore(main): release 3.1.0 (#28) #52

name: release-please
on:
push:
branches: [main]
permissions: {}
jobs:
release-please:
permissions:
contents: write # to create release commit
pull-requests: write # to create release PR
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: bad-words-next
- uses: actions/checkout@v3
with:
path: bad-words-next
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
always-auth: true
- name: Build and publish
run: |
cd $GITHUB_WORKSPACE/bad-words-next
yarn
yarn build
yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- name: Wiki build
run: |
cd $GITHUB_WORKSPACE/bad-words-next
yarn docs
if: ${{ steps.release.outputs.release_created }}
- name: Wiki checkout
uses: actions/checkout@v3
with:
repository: "alexzel/bad-words-next.wiki"
path: bad-words-next.wiki
if: ${{ steps.release.outputs.release_created }}
- name: Wiki copy files
run: |
git config --global user.email "actions@github.com"
git config --global user.name "Wiki mirror"
cp $GITHUB_WORKSPACE/bad-words-next/docs/*.md $GITHUB_WORKSPACE/bad-words-next.wiki
cd $GITHUB_WORKSPACE/bad-words-next.wiki
git add .
git diff-index --quiet HEAD -- || git commit -m "Update wiki pages"
git push
if: ${{ steps.release.outputs.release_created }}