Nightly Release #22
This file contains hidden or 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: Nightly Release | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 12 * * *' # 1200 UTC | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'vuetifyjs' }} | |
| strategy: | |
| max-parallel: 1 | |
| fail-fast: false | |
| matrix: | |
| branch: ['master', 'dev', 'next'] | |
| include: | |
| - branch: 'master' | |
| tag: 'latest' | |
| preid: 'prepatch' | |
| - branch: 'dev' | |
| tag: 'dev' | |
| preid: 'preminor' | |
| - branch: 'next' | |
| tag: 'next' | |
| preid: 'premajor' | |
| env: | |
| RELEASE_BRANCH: ${{ matrix.branch }} | |
| RELEASE_TAG: ${{ matrix.tag }} | |
| RELEASE_PREID: ${{ matrix.preid }} | |
| steps: | |
| - run: | | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "GitHub Actions" | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ matrix.branch }} | |
| fetch-depth: 0 | |
| - run: | | |
| last=$(git show -s --format=%ct HEAD) | |
| now=$(date +%s) | |
| diff=$(($now - $last)) | |
| if [ $diff -gt 86400 ]; then | |
| echo "Last commit was more than 24 hours ago, skipping release" | |
| exit 1 | |
| fi | |
| - uses: actions/cache@v2 | |
| with: | |
| path: | | |
| node_modules | |
| **/node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }} | |
| - run: yarn --frozen-lockfile --non-interactive | |
| - run: yarn lerna version --conventional-commits --conventional-prerelease --no-push --no-commit-hooks --preid "$RELEASE_BRANCH-$(date +'%Y%m%d')" --yes | |
| - run: yarn conventional-changelog -p angular --outfile ./packages/vuetify/CHANGELOG.md -r 2 | |
| - run: cat ./packages/vuetify/CHANGELOG.md | |
| - run: >- | |
| node -e "fs.writeFileSync( | |
| './package.json', | |
| JSON.stringify({ ...require('./package.json'), name: '@vuetify/nightly' }, null, 2) | |
| )" | |
| working-directory: ./packages/vuetify | |
| - run: yarn lerna run build --scope @vuetify/nightly | |
| - run: ls -lah | |
| - name: NPM Release | |
| run: | | |
| npm config set //registry.npmjs.org/:_authToken ${NPM_API_KEY:?} | |
| npm publish ./packages/vuetify --tag $RELEASE_TAG --access public | |
| env: | |
| NPM_API_KEY: ${{ secrets.NPM_TOKEN }} | |
| TAG_NAME: ${{ env.RELEASE_TAG }} | |
| percy: | |
| name: Visual regression tests | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'vuetifyjs' }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: next | |
| fetch-depth: 0 | |
| - run: | | |
| last=$(git show -s --format=%ct HEAD) | |
| now=$(date +%s) | |
| diff=$(($now - $last)) | |
| if [ $diff -gt 86400 ]; then | |
| echo "Last commit was more than 24 hours ago, skipping tests" | |
| exit 1 | |
| fi | |
| - uses: actions/cache@v2 | |
| with: | |
| path: | | |
| node_modules | |
| **/node_modules | |
| /home/runner/.cache/Cypress | |
| key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }} | |
| - run: yarn --frozen-lockfile --non-interactive | |
| - run: echo "COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
| - run: yarn cy:run | |
| working-directory: ./packages/vuetify | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
| PERCY_BRANCH: next | |
| PERCY_TARGET_BRANCH: next | |
| PERCY_COMMIT: ${{ env.COMMIT }} | |
| - uses: actions/upload-artifact@v2 | |
| if: failure() | |
| with: | |
| name: cypress-screenshots | |
| path: ./packages/vuetify/cypress/screenshots/ | |
| if-no-files-found: ignore |