-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (39 loc) · 1.3 KB
/
update-version.yml
File metadata and controls
44 lines (39 loc) · 1.3 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
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
env:
LIBRARY_VERSION: ${{ github.event.inputs.libraryVersion }}
PACKAGE_VERSION: ${{ github.event.inputs.packageVersion }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update Package Version
run: |
sed -i -E 's/^([[:space:]]*)version="[^"]*"/\1version="${{ env.PACKAGE_VERSION }}"/' setup.py
- name: Update Library Version
run: |
sed -i -E 's/^([[:space:]]*lexactivator_libs_version[[:space:]]*=[[:space:]]*)"[^"]*"/\1"v${{ env.LIBRARY_VERSION }}"/' pre-publish.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: ci/${{ env.PACKAGE_VERSION }}
title: "chore: bump package version to ${{ env.PACKAGE_VERSION }}"
commit-message: "chore(package version): updated version"
body: |
Automated package version bump.
base: master
add-paths: |
pre-publish.py
setup.py