-
Notifications
You must be signed in to change notification settings - Fork 63
48 lines (42 loc) · 1.59 KB
/
update-luau-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
39
40
41
42
43
44
45
46
47
48
name: Update Luau Version
on:
workflow_dispatch:
schedule:
- cron: "10 0 * * *" # Runs at 00:10 UTC every day
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Generate App Token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TYPES_GENERATOR_APP_ID }}
private-key: ${{ secrets.TYPES_GENERATOR_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: true
fetch-depth: 0
- name: Update Luau Version
id: update_luau_version
run: |
version=$(scripts/update_luau_and_changelog.py | tr '\n' ' ')
echo "LUAU_VERSION=$version" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: create_pull_request
uses: peter-evans/create-pull-request@v6
with:
title: Sync to upstream Luau ${{ steps.update_luau_version.outputs.LUAU_VERSION }}
body: |
Sync to upstream Luau ${{ steps.update_luau_version.outputs.LUAU_VERSION }}
- This pull request is **auto-generated**
branch: auto/update-luau
commit-message: Sync to upstream Luau ${{ steps.update_luau_version.outputs.LUAU_VERSION }}
base: main
token: ${{ steps.generate_token.outputs.token }}
# - name: Enable Pull Request Automerge
# run: gh pr merge --squash --auto "${{ steps.create_pull_request.outputs.pull-request-number }}"
# env:
# GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}