# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages # This file was contributed by Carlos Parada and Yamel Senih from ERP Consultores y Asociados, C.A name: Publish Project on: release: types: [created] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [10.x, 12.x, 13.x, 14.x] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: npm i - run: npm test - run: npm run build:prod --if-present - run: set -e - run: | cd docs npm i npm run build publish-dist: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 registry-url: https://registry.npmjs.org/ - run: set -e - run: | cd docs npm i npm run build - run: | cd docs git clone https://github.com/adempiere/adempiere-vue.git --branch gh-pages --single-branch gh-pages cp -r .vuepress/dist/* gh-pages/ cd gh-pages touch .nojekyll git init git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . git commit -m "Update documentation" -a || true - uses: ad-m/github-push-action@master with: branch: gh-pages directory: docs/gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} - run: npm i - run: sed -i "s|releaseNoForDocumentation|${{ github.event.release.tag_name }}|g" config/default.json - run: npm run build:prod --if-present - uses: TheDoctor0/zip-release@0.4.1 with: filename: 'Adempiere-Vue.zip' path: 'dist/' - uses: skx/github-action-publish-binaries@master env: GITHUB_TOKEN: ${{ secrets.TOKEN_ACCESS }} with: args: 'Adempiere-Vue.zip'