build: bump cmake_minimum_required to 3.5 #249
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: Push rockspec | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '*' | |
| env: | |
| ROCK_NAME: "crud" | |
| jobs: | |
| version-check: | |
| # We need this job to run only on push with tag. | |
| if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check module version | |
| uses: tarantool/actions/check-module-version@master | |
| with: | |
| module-name: 'crud' | |
| push-scm-rockspec: | |
| runs-on: ubuntu-22.04 | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: tarantool/rocks.tarantool.org/github-action@master | |
| with: | |
| auth: ${{ secrets.ROCKS_AUTH }} | |
| files: ${{ env.ROCK_NAME }}-scm-1.rockspec | |
| push-tagged-rockspec: | |
| runs-on: ubuntu-22.04 | |
| if: startsWith(github.ref, 'refs/tags') | |
| needs: version-check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | |
| - name: Set env | |
| run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Create release rockspec | |
| run: | | |
| sed \ | |
| -e "s/branch = '.\+'/tag = '${GIT_TAG}'/g" \ | |
| -e "s/version = '.\+'/version = '${GIT_TAG}-1'/g" \ | |
| ${{ env.ROCK_NAME }}-scm-1.rockspec > ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec | |
| - uses: tarantool/rocks.tarantool.org/github-action@master | |
| with: | |
| auth: ${{ secrets.ROCKS_AUTH }} | |
| files: ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec |