Check for update and tag #314
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: Check for update and tag | |
| on: | |
| schedule: | |
| - cron: "43 2 * * *" | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| nightly: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - run: sh Scripts/pod.sh 0.0.$(date -v -1d +%Y%m%d) | |
| id: pod | |
| - name: Update sources | |
| if: ${{ steps.pod.outputs.version }} | |
| run: sh Scripts/all.sh | |
| - name: Commit | |
| if: ${{ steps.pod.outputs.version }} | |
| uses: EndBug/add-and-commit@v7 | |
| with: | |
| add: 'Sources' | |
| message: "add ${{ steps.pod.outputs.version }}" | |
| - if: ${{ steps.pod.outputs.version }} | |
| run: | | |
| git tag "${{ steps.pod.outputs.version }}" | |
| git push --tags | |
| release: | |
| needs: nightly | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - id: pod | |
| run: sh Scripts/pod.sh | |
| - name: Update sources | |
| if: ${{ steps.pod.outputs.version }} | |
| run: sh Scripts/all.sh | |
| - name: Commit | |
| if: ${{ steps.pod.outputs.version }} | |
| uses: EndBug/add-and-commit@v7 | |
| with: | |
| add: 'Package.swift' | |
| message: "add ${{ steps.pod.outputs.version }}" | |
| - name: Tag | |
| if: ${{ steps.pod.outputs.version }} | |
| run: | | |
| git tag "${{ steps.pod.outputs.version }}" | |
| git push --tags |