-
Notifications
You must be signed in to change notification settings - Fork 51
38 lines (34 loc) · 964 Bytes
/
calver.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_CalVer
on:
push:
branches:
- 'main'
paths:
- 'subgen.py'
- 'launcher.py'
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set Calver Version
uses: Nelyx/action-calver@v1.0.0
id: setcalver
with:
default_branch: 'refs/heads/main'
format: 'YYYY.M.D'
version_prefix: ''
- name: Update version file
run: |
sed -i "s/subgen_version =.*/subgen_version = '${{ steps.setcalver.outputs.package_version }}'/" subgen.py
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add subgen.py
git commit -m "Automated update subgen.py with version"
git push