GuideChimp - Release #107
Workflow file for this run
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: GuideChimp - Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Checkout GuideChimp | |
uses: actions/checkout@v3 | |
with: | |
path: guidechimp | |
- name: Read GuideChimp Plugins version | |
id: guidechimp_plugins_version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: './guidechimp/package.json' | |
prop_path: 'plugins.guidechimp-plugins' | |
- name: Checkout GuideChimp Plugins (v${{steps.guidechimp_plugins_version.outputs.prop}}) | |
uses: actions/checkout@v3 | |
with: | |
path: guidechimp-plugins | |
repository: Labs64/GuideChimp-plugins | |
ref: ${{steps.guidechimp_plugins_version.outputs.prop}} | |
token: ${{ secrets.GUIDECHIMP_PAT }} | |
- name: Build and test package | |
run: | | |
cd guidechimp | |
npm ci | |
npm run build --if-present | |
npm test | |
ls -la -R dist/ | |
cd ../guidechimp-plugins | |
npm ci | |
npm run build --if-present | |
ls -la -R dist/ | |
rsync -av dist/ ../guidechimp/dist/plugins | |
env: | |
GUIDECHIMP_PRIVATE_KEY: ${{secrets.GUIDECHIMP_PRIVATE_KEY}} | |
GUIDECHIMP_PUBLIC_KEY: ${{secrets.GUIDECHIMP_PUBLIC_KEY}} | |
- name: Publish to npmjs.org | |
run: | | |
cd guidechimp | |
ls -la -R dist | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |