-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.1 KB
/
update-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
name: Update version
on:
workflow_dispatch:
inputs:
libraryVersion:
description: 'Library Version'
required: true
default: ''
packageVersion:
description: 'Package Version'
required: true
default: ''
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Update Package Version
run: |
sed -i '/version=/!b;c \ \ \ \ version="${{ github.event.inputs.packageVersion }}",' setup.py
- name: Update Library Version
run: |
sed -i '/lexfloatclient_libs_version =/!b;clexfloatclient_libs_version = "v${{ github.event.inputs.libraryVersion }}"' pre-publish.py
- name: Commit, Tag and Push
run: |
git add pre-publish.py
git add setup.py
git config user.name github-actions
git config user.email github-actions@github.com
git commit -m "updated version" | exit 0
git tag ${{ github.event.inputs.packageVersion }}
git push & git push --tags