-
Notifications
You must be signed in to change notification settings - Fork 6
72 lines (59 loc) · 2.29 KB
/
Copy pathupdate-version.yml
File metadata and controls
72 lines (59 loc) · 2.29 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Update Version Information
on:
push:
tags:
- 'v*' # Triggers on version tags like v1.22.0.20
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Extract version from tag
id: version
run: |
# Extract version from tag (remove 'v' prefix)
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"
# Generate current date in M/D/YYYY format
DATE=$(date +'%-m/%-d/%Y')
echo "date=$DATE" >> $GITHUB_OUTPUT
echo "Generated date: $DATE"
- name: Update version information
run: |
VERSION="${{ steps.version.outputs.version }}"
DATE="${{ steps.version.outputs.date }}"
echo "Updating version to: $VERSION"
echo "Using date: $DATE"
# Run the version update script
./update-version.sh "$VERSION" "$DATE"
- name: Validate JSON files
run: |
VERSION="${{ steps.version.outputs.version }}"
node scripts/validate-json.js "$VERSION"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update version to ${{ steps.version.outputs.version }}"
title: "Update version to ${{ steps.version.outputs.version }}"
body: |
This PR updates the version information to ${{ steps.version.outputs.version }}.
Changes made:
- Updated version description in downloadContent.json
- Added new release entry in downloadContent.json
- Updated currentVersion and moved previous version to PreviousVersions in platform-specific files
- Added new release entry in downloadNightly.json
- Applied same changes to all language variants (de, es, zh-Hans)
Auto-generated by GitHub Actions on tag ${{ github.ref }}
branch: update-version-${{ steps.version.outputs.version }}
base: master
delete-branch: true