chore: update all github actions workflows and allow downloading translations to a branch
This commit is contained in:
parent
78385c3184
commit
b4b8d95cfd
5 changed files with 38 additions and 26 deletions
22
.github/workflows/application.yml
vendored
22
.github/workflows/application.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
|||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v3
|
||||
|
@ -31,7 +31,7 @@ jobs:
|
|||
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||
name: Java ${{ matrix.java-version }} (${{ matrix.os }}) Tests
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v3
|
||||
|
@ -58,7 +58,7 @@ jobs:
|
|||
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
||||
name: Java ${{ matrix.java-version }} (${{ matrix.os }}) Build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v3
|
||||
|
@ -77,7 +77,7 @@ jobs:
|
|||
version: ${{ steps.version.outputs.text }}
|
||||
clean-version: ${{ steps.clean-version.outputs.replaced }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v3
|
||||
|
@ -95,7 +95,7 @@ jobs:
|
|||
|
||||
- name: Remove stream from version
|
||||
id: clean-version
|
||||
uses: frabert/replace-string-action@v1.2
|
||||
uses: frabert/replace-string-action@v2
|
||||
with:
|
||||
string: ${{ steps.version.outputs.text }}
|
||||
pattern: '([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\.?\w*'
|
||||
|
@ -105,7 +105,7 @@ jobs:
|
|||
run: ./gradlew build -x test
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ATLauncher
|
||||
path: dist/*
|
||||
|
@ -117,10 +117,10 @@ jobs:
|
|||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download built artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Read changelog
|
||||
id: changelog
|
||||
|
@ -130,7 +130,7 @@ jobs:
|
|||
|
||||
- name: Remove the top part of the changelog
|
||||
id: remove-top-of-changelog
|
||||
uses: frabert/replace-string-action@v1.2
|
||||
uses: frabert/replace-string-action@v2
|
||||
with:
|
||||
string: ${{ steps.changelog.outputs.text }}
|
||||
pattern: '^.*?(### (New Features|Fixes|Misc)\n.*)$'
|
||||
|
@ -185,7 +185,7 @@ jobs:
|
|||
version: "${{ needs.package.outputs.clean-version }}"
|
||||
|
||||
- name: Package up AUR versions
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
event-type: aur-publish
|
||||
|
@ -211,7 +211,7 @@ jobs:
|
|||
echo "${NEW_VERSION}.Beta" > src/main/resources/version
|
||||
|
||||
- name: Commit new version/CHANGELOG file
|
||||
uses: EndBug/add-and-commit@v7.0.0
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: "CHANGELOG.md src/main/resources/version"
|
||||
message: "chore: bump version"
|
||||
|
|
4
.github/workflows/aur-publish.yml
vendored
4
.github/workflows/aur-publish.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
|||
aur-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Publish atlauncher AUR package
|
||||
uses: ./.github/actions/publish-to-aur
|
||||
|
@ -33,7 +33,7 @@ jobs:
|
|||
aurCommitMessage: Update to version ${{ github.event.client_payload.version }}
|
||||
|
||||
- name: Commit changed files
|
||||
uses: EndBug/add-and-commit@v7.0.0
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: "packaging/aur/"
|
||||
message: "chore: update aur packages"
|
||||
|
|
12
.github/workflows/crowdin-sync.yml
vendored
12
.github/workflows/crowdin-sync.yml
vendored
|
@ -4,7 +4,7 @@ on:
|
|||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- 'src/main/java/com/atlauncher/**'
|
||||
- "src/main/java/com/atlauncher/**"
|
||||
|
||||
jobs:
|
||||
synchronize-with-crowdin:
|
||||
|
@ -12,7 +12,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install gettext
|
||||
run: sudo apt-get install -y gettext
|
||||
|
@ -20,9 +20,9 @@ jobs:
|
|||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
distribution: "temurin"
|
||||
java-version: 8
|
||||
cache: 'gradle'
|
||||
cache: "gradle"
|
||||
|
||||
- name: Generate translations.pot
|
||||
run: ./gradlew generatePots
|
||||
|
@ -31,13 +31,13 @@ jobs:
|
|||
run: msguniq -o build/gettext/launcher.pot build/gettext/translations.pot
|
||||
|
||||
- name: Upload source to crowdin
|
||||
uses: crowdin/github-action@1.4.10
|
||||
uses: crowdin/github-action@v1.14.1
|
||||
with:
|
||||
upload_sources: true
|
||||
upload_translations: false
|
||||
download_translations: false
|
||||
push_translations: false
|
||||
upload_sources_args: '--dest=launcher.pot'
|
||||
upload_sources_args: "--dest=launcher.pot"
|
||||
source: build/gettext/launcher.pot
|
||||
translation: /src/main/resources/assets/lang/%locale%.po
|
||||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
|
|
25
.github/workflows/download-translations.yml
vendored
25
.github/workflows/download-translations.yml
vendored
|
@ -1,6 +1,12 @@
|
|||
name: Download Translations
|
||||
|
||||
on: [workflow_dispatch]
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch to download the approved translations to"
|
||||
default: "master"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
download-translations:
|
||||
|
@ -8,23 +14,28 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: Download translations from crowdin
|
||||
uses: crowdin/github-action@1.4.10
|
||||
uses: crowdin/github-action@v1.14.1
|
||||
with:
|
||||
upload_sources: false
|
||||
upload_translations: false
|
||||
download_translations: true
|
||||
skip_untranslated_strings: true
|
||||
skip_untranslated_files: true
|
||||
export_only_approved: true
|
||||
push_translations: false
|
||||
source: build/gettext/launcher.pot
|
||||
translation: /src/main/resources/assets/lang/%locale%.po
|
||||
download_translations_args: "--all --verbose"
|
||||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
|
||||
- name: Commit changed files
|
||||
uses: EndBug/add-and-commit@v7.0.0
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: 'packaging/aur/'
|
||||
message: 'chore: update translations'
|
||||
add: "src/main/resources/assets/lang/"
|
||||
message: "chore: update translations"
|
||||
new_branch: ${{ inputs.branch }}
|
||||
|
|
|
@ -27,3 +27,4 @@ This changelog only contains the changes that are unreleased. For changes for in
|
|||
- Implement RxJava in InstanceManager [#795]
|
||||
- Add UUID to Instances [#795]
|
||||
- Implement RxJava in all update managers [#795]
|
||||
- Update all github actions workflows and allow downloading translations to a branch
|
Loading…
Reference in a new issue