GuideChimp - Release #100
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: 14 | |
registry-url: https://registry.npmjs.org/ | |
- name: Checkout GuideChimp | |
uses: actions/checkout@v3 | |
with: | |
path: guidechimp-core | |
- name: Read GuideChimp Plugins version | |
id: guidechimp_plugins_version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: './guidechimp-core/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-core | |
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-core/dist/plugins | |
env: | |
GUIDECHIMP_PRIVATE_KEY: ${{secrets.GUIDECHIMP_PRIVATE_KEY}} | |
GUIDECHIMP_PUBLIC_KEY: ${{secrets.GUIDECHIMP_PUBLIC_KEY}} | |
- name: Publish to npmjs.org | |
run: | | |
ls -la -R guidechimp-core/dist | |
npm publish guidechimp-core | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |