Force push tags #24
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: Build and test | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test-project: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup UCM | |
| id: install-ucm | |
| uses: ./ | |
| - name: Print version information | |
| if: steps.install-ucm.outputs.ucm-version != '' | |
| run: echo ${{ steps.install-ucm.outputs.ucm-version }} | |
| - name: Tag version | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}} | |
| run: | | |
| echo "Tagging version: ${{ steps.install-ucm.outputs.ucm-version}}" | |
| git tag --force v${{ steps.install-ucm.outputs.ucm-version }} | |
| git tag --force v1 v${{ steps.install-ucm.outputs.ucm-version }} | |
| git push origin --tags --force |