- input-filled #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate theme JSON files | |
on: | |
push: | |
branches: [main] | |
jobs: | |
publish: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
# This check needs to be in place to prevent a publish loop with auto and github actions | |
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare repository | |
run: git fetch --unshallow --tags | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: 'Automated Version Bump' | |
uses: 'phips28/gh-action-bump-version@master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
minor-wording: 'add,Adds,new' | |
major-wording: 'MAJOR,cut-major' | |
patch-wording: 'patch,fixes' # Providing patch-wording will override commits | |
# defaulting to a patch bump. | |
rc-wording: 'RELEASE,alpha' | |
- name: Create .npmrc file | |
run: | | |
echo @getpingback:registry=https://npm.pkg.github.com >> .npmrc | |
echo //npm.pkg.github.com/:_authToken=${{ secrets.NPM_PB_TOKEN }} >> .npmrc | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: yarn-deps-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
yarn-deps-${{ hashFiles('yarn.lock') }} | |
- name: Publishing package | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
yarn install --frozen-lockfile | |
yarn generate | |
yarn publish --access public --non-interactive --no-git-tag-version |