name: MDC Release (Pull Request) # This workflow creates or updates (if already exists) a pull request with new # version bump on every commit to master. on: push: branches: - master paths: - "packages/**/*.ts" - "packages/**/*.scss" - "**/package*.json" - "**/.npmignore" - "**/*.md" jobs: release-pull-request: runs-on: ubuntu-latest steps: - name: Clone repository uses: actions/checkout@v2 with: ref: master fetch-depth: 0 - name: Fetch all tags run: | git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Setup node uses: actions/setup-node@v1 with: node-version: 14 registry-url: https://registry.npmjs.org/ - name: Cache dependencies uses: actions/cache@v2 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Install dependencies run: | npm ci --ignore-scripts npm run bootstrap - name: Bump version run: | npx lerna version --conventional-commits --no-git-tag-version --no-push --yes - name: Create PR uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "chore: Release" author: Material Web Team title: "chore: Release" body: | This PR was opened by [release][1] GitHub action. When you're ready to do a release, you can merge this and release action will automatically publishes to npm registry. If you're not ready to do a release yet, that's fine, whenever you add more commits to master, this PR will be updated. [1]: http://github.com/material-components/material-components-web/tree/master/.github/workflows/release-pull-request.yml branch: chore/release