forked from LibreSpark/LibreTV
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 911 Bytes
/
version.yml
File metadata and controls
35 lines (31 loc) · 911 Bytes
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
name: Bump version
on:
push:
branches:
- main
workflow_dispatch:
jobs:
bump-version:
if: github.repository == 'LibreSpark/LibreTV'
runs-on: ubuntu-latest
env:
TZ: 'Asia/Shanghai'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Bump version and commit changes
run: |
CURRENT_TIME=$(date +"%Y-%m-%d %H:%M")
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
echo $(date +"%Y%m%d%H%M") > VERSION.txt
git add VERSION.txt
git commit -m "Auto Update $CURRENT_TIME"
git push origin main
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 2