release #175
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: release | |
on: | |
push: | |
branches: [main, beta] | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 14.15.x | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Git set user | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions[bot]" | |
- name: Cache node modules global | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }} | |
- name: Cache node modules local | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules-local | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }} | |
- run: npm i | |
# at some point https://github.com/nrwl/last-successful-commit-action to release only affected | |
# - run: npm run affected:lint -- --base=origin/main | |
# - run: npm run nx -- run workspace:version --version=prerelease --preid=alpha | |
- run: npm run nx -- run-many --all --target=build --prod | |
- run: npm run nx -- run-many --all --target=test | |
- name: 'Build cli' | |
run: | | |
cd ./libs/cli | |
npm i | |
npm run build | |
- run: node ./tools/sync-package-metadata.js | |
- run: npx semantic-release | |
# - run: node ./tools/npm-publish.js | |
env: | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
# - run: npm run affected:e2e -- --headless --base=origin/main | |
# - run: git push --follow-tags |