-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (40 loc) · 1.22 KB
/
bump_version.yml
File metadata and controls
47 lines (40 loc) · 1.22 KB
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
42
43
44
45
46
47
name: Bump Release Version
on:
push:
tags-ignore:
- '*'
paths-ignore:
- 'Skyflow.podspec'
- '*.md'
- 'Sources/Skyflow/Version.swift'
branches:
- public-release/*
jobs:
bump_version_spec:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.PAT_ACTIONS }}
- name: Fetch branch name
id: branch
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
- name: Extract version number
id: version
run: |
version=${{ steps.branch.outputs.branch }}
version=${version#public-release/}
echo "::set-output name=version::$version"
- name: Bump Version
run: |
chmod +x ./scripts/bump_version.sh
./scripts/bump_version.sh ${{ steps.version.outputs.version }}
- name: Commit changes
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
git add Skyflow.podspec
git add Sources/Skyflow/Version.swift
git commit -m "[AUTOMATED] Public Release ${{ steps.version.outputs.version }}"
git push origin