forked from codacy/git-version
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1 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
39
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- shell: bash
run: |
set -eo pipefail
download_url="$(curl -Ls https://api.github.com/repos/linz/action-git-version/releases/latest | jq -r .assets[0].browser_download_url)"
curl -Ls "$download_url" > /usr/local/bin/git-version
chmod +x /usr/local/bin/git-version
- id: previous-version
shell: bash
run: |
set -eo pipefail
PREVIOUS_VERSION=$(git-version \
--previous-version \
--release-branch "master" \
--dev-branch "" \
--minor-identifier="feat:" \
--major-identifier="BREAKING CHANGE:" \
--version-prefix "v" \
--version-suffix "")