feat: support for universal releases in git-mkver v1.3.0 #152
This file contains 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: CI | |
on: push | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-latest, windows-2019] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup specific version (specially one prior to v1.3.0) | |
uses: ./ | |
with: | |
version: "1.2.2" | |
- name: Assert that specific version is installed | |
run: | | |
[[ $(git mkver | grep -o "1.2.2") == "1.2.2" ]] || exit 1 | |
shell: bash | |
- name: Setup latest git-mkver version | |
uses: ./ | |
- name: Assert that latest version is installed | |
run: | | |
VERSION=$(curl -s https://api.github.com/repos/idc101/git-mkver/releases/latest | jq -r '.tag_name |= (sub("v";"")) | .tag_name') | |
[[ $(git mkver | grep -o "$VERSION") == "$VERSION" ]] || exit 1 | |
shell: bash | |
tag: | |
needs: test | |
runs-on: ubuntu-20.04 | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: fregante/setup-git-user@v1 | |
- uses: ./ | |
- run: git mkver tag | |
- run: git push origin --tags |