Files
standardnotes-app-web/.github/workflows/components.publish.yml
2022-06-14 09:41:22 -05:00

45 lines
1.3 KiB
YAML

name: Components Publish
on:
push:
branches: [ develop, main ]
paths:
- packages/components/**
workflow_dispatch:
jobs:
publish:
if: contains(github.event.head_commit.message, 'chore(release)') == false
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/components
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0
- uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- run: yarn install
- run: yarn build:components
- name: Setup git config
run: |
git config --global user.name "standardci"
git config --global user.email "ci@standardnotes.com"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- run: |
node scripts/package-components.mjs
git add dist
(git commit -m 'chore(release): components') || true
(git push -u origin HEAD) || true