-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 1.13 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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