chore: Switch to a new v1.6.4-20241102 release naming schema
This commit is contained in:
parent
3b9c7397e6
commit
a4d9a675c2
|
@ -1,18 +0,0 @@
|
||||||
import argparse
|
|
||||||
import re
|
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser("convert_tag_release_name")
|
|
||||||
parser.add_argument("tag", help="Release tag", type=str)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
tag = args.tag
|
|
||||||
# A format of the tag is r+yyyyMMdd, we
|
|
||||||
# strip out any non digit symbols here.
|
|
||||||
date_str = re.match(r'[^\d]*(\d+).*', tag).group(1)
|
|
||||||
date = datetime.strptime(date_str, '%Y%m%d')
|
|
||||||
|
|
||||||
# Release date name.
|
|
||||||
out = "{:%Y.%m.%d}".format(date)
|
|
||||||
print(out)
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
import argparse
|
||||||
|
import re
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser("convert_tag_release_name")
|
||||||
|
parser.add_argument("tag", help="Release tag", type=str)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
tag = args.tag
|
||||||
|
# A format of the tag is r00000000.0
|
||||||
|
tag_formatted = re.match(r'[^\d]*([\d\.]+).*', tag).group(1)
|
||||||
|
|
||||||
|
with open("gradle/libs.versions.toml", mode="r") as file:
|
||||||
|
toml = file.read()
|
||||||
|
version = re.search(r'appVersionName\s*=\s*"(.*)"', toml).group(1)
|
||||||
|
|
||||||
|
# Release name
|
||||||
|
out = f"v{version}-{tag_formatted}"
|
||||||
|
print(out)
|
|
@ -296,13 +296,13 @@ jobs:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
- id: vars
|
- id: vars
|
||||||
run: |
|
run: |
|
||||||
date=$(python .github/convert_tag_release_name.py tag=${{ github.ref_name }})
|
release_name=$(python .github/get_release_name.py tag=${{ github.ref_name }})
|
||||||
echo "date=$date" >> $GITHUB_OUTPUT
|
echo "release_name=release_name" >> $GITHUB_OUTPUT
|
||||||
- name: "Create release"
|
- name: "Create release"
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
name: Release ${{ steps.vars.outputs.date }}
|
name: Release ${{ steps.vars.outputs.release_name }}
|
||||||
body: ${{ steps.changelog.outputs.changelog }}
|
body: ${{ steps.changelog.outputs.changelog }}
|
||||||
token: ${{ secrets.PERSONAL_TOKEN }}
|
token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
files: |
|
files: |
|
||||||
|
|
Loading…
Reference in New Issue