|
| 1 | +name: Master CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + prepare_release: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + |
| 14 | + - name: Configure Git |
| 15 | + run: | |
| 16 | + git config --global user.email "[email protected]" |
| 17 | + git config --global user.name "GitHub Actions" |
| 18 | + |
| 19 | + - name: Un-SNAP root |
| 20 | + run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false |
| 21 | + |
| 22 | + - name: Un-SNAP demo |
| 23 | + run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false |
| 24 | + working-directory: vaadin-date-range-picker-demo |
| 25 | + |
| 26 | + - name: Un-SNAP |
| 27 | + run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false |
| 28 | + working-directory: vaadin-date-range-picker |
| 29 | + |
| 30 | + - name: Get version |
| 31 | + id: version |
| 32 | + run: | |
| 33 | + echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" |
| 34 | + working-directory: vaadin-date-range-picker |
| 35 | + |
| 36 | + - name: Commit and Push |
| 37 | + run: | |
| 38 | + git add -A |
| 39 | + git commit -m "Release ${{ steps.version.outputs.release }}" |
| 40 | + git push origin |
| 41 | + git tag v${{ steps.version.outputs.release }} |
| 42 | + git push origin --tags |
| 43 | +
|
| 44 | + after_release: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + needs: [prepare_release] |
| 47 | + steps: |
| 48 | + - uses: actions/checkout@v2 |
| 49 | + |
| 50 | + - name: Init Git and pull |
| 51 | + run: | |
| 52 | + git config --global user.email "[email protected]" |
| 53 | + git config --global user.name "GitHub Actions" |
| 54 | + git pull |
| 55 | + |
| 56 | + - name: Inc Version and SNAP root |
| 57 | + run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true |
| 58 | + |
| 59 | + - name: Inc Version and SNAP demo |
| 60 | + run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true |
| 61 | + working-directory: vaadin-date-range-picker-demo |
| 62 | + |
| 63 | + - name: Inc Version and SNAP |
| 64 | + run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true |
| 65 | + working-directory: vaadin-date-range-picker |
| 66 | + |
| 67 | + - name: Git Commit and Push |
| 68 | + run: | |
| 69 | + git add -A |
| 70 | + git commit -m "Preparing for next development iteration" |
| 71 | + git push origin |
| 72 | + |
| 73 | + - name: pull-request |
| 74 | + uses: repo-sync/pull-request@v2 |
| 75 | + with: |
| 76 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + destination_branch: "develop" |
| 78 | + pr_title: "Sync back" |
| 79 | + pr_body: "An automated PR to sync changes back" |
| 80 | + |
0 commit comments