mirror of
https://github.com/NatsumeLS/Gakumas-Translation-Data-EN.git
synced 2026-02-07 18:22:32 +00:00
feat(release): Automate Release Process
This commit is contained in:
38
.github/workflows/check.yml
vendored
38
.github/workflows/check.yml
vendored
@@ -100,12 +100,14 @@ jobs:
|
|||||||
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||||
git config --global user.name "$GITHUB_ACTOR"
|
git config --global user.name "$GITHUB_ACTOR"
|
||||||
|
|
||||||
- name: Write Branch and Hash Info
|
- name: Write Branch and Hash Info with Date
|
||||||
run: |
|
run: |
|
||||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
hash=$(git rev-parse --short=7 HEAD)
|
hash=$(git rev-parse --short=7 HEAD)
|
||||||
echo "$branch.$hash" > version.txt
|
date=$(date +'%Y%m%d')
|
||||||
echo "VERSION=$branch.$hash" >> $GITHUB_ENV
|
echo "$branch.$hash.$date" > version.txt
|
||||||
|
echo "VERSION=$branch.$hash.$date" >> $GITHUB_ENV
|
||||||
|
echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
run: |
|
run: |
|
||||||
@@ -115,6 +117,36 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
|
|
||||||
|
- name: Create ZIP Archive
|
||||||
|
run: |
|
||||||
|
zip -r Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip local-files version.txt
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.VERSION }}
|
||||||
|
name: Translation Data Update ${{ env.RELEASE_DATE }}
|
||||||
|
body: |
|
||||||
|
# Translation Data Update ${{ env.RELEASE_DATE }}
|
||||||
|
|
||||||
|
## Version: ${{ env.VERSION }}
|
||||||
|
|
||||||
|
This is an automated release of the latest translation data.
|
||||||
|
|
||||||
|
### How to use:
|
||||||
|
1. Disable `Fast Initialization` in the `Basic Settings` tab.
|
||||||
|
2. Disable `Replace Font` in the `Basic Settings` tab.
|
||||||
|
3. Enable `MasterDB Localization` in the `Debug Settings/Advanced` tab.
|
||||||
|
4. Enable `Check Resource Update From API` in the `Resource Settings` tab
|
||||||
|
5. Enter `https://api.github.com/repos/NatsumeLS/Gakumas-Translation-Data-EN/releases/latest`
|
||||||
|
6. Download the Translation Data
|
||||||
|
files: |
|
||||||
|
Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
|
|
||||||
- name: Send Notification to Discord
|
- name: Send Notification to Discord
|
||||||
uses: sarisia/actions-status-discord@v1
|
uses: sarisia/actions-status-discord@v1
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user