-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.06 KB
/
test-and-version.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
39
40
41
name: CI
on:
push:
branches:
- master
paths-ignore:
- '.github/**'
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Run tests
run: |
sudo apt-get upgrade && apt-get update
sudo apt-get install -y bats
./test.sh
- uses: ./versioner/
id: versioner
- name: publish tag
if: ${{ github.ref == 'refs/heads/master' }}
run: |
git config --global user.email ${{ secrets.EMAIL }}
git config --global user.name ${{ secrets.NAME }}
git tag -a ${{ steps.versioner.outputs.version }} -m ${{ steps.versioner.outputs.version }}
git push --tags