Skip to content

fix(l10n): Update translations from Transifex #619

fix(l10n): Update translations from Transifex

fix(l10n): Update translations from Transifex #619

# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Nightly Release
on:
push:
branches:
- stable*
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/nightly-release.yml'
workflow_dispatch:
permissions:
contents: write
actions: write
jobs:
check-latest-stable:
runs-on: ubuntu-latest
outputs:
is_latest: ${{ steps.latest.outputs.is_latest }}
latest_branch: ${{ steps.latest.outputs.latest_branch }}
steps:
- name: Determine latest stable branch
id: latest
run: |
latest_number=$(git ls-remote --heads https://github.com/${{ github.repository }}.git "stable*" | awk -F/ '{print $NF}' | sed 's/^stable//' | sort -n | tail -1)
if [ -z "$latest_number" ]; then
echo "is_latest=false" >> $GITHUB_OUTPUT
exit 0
fi
latest_branch="stable${latest_number}"
echo "latest_branch=${latest_branch}" >> $GITHUB_OUTPUT
if [ "${GITHUB_REF_NAME}" = "${latest_branch}" ]; then
echo "is_latest=true" >> $GITHUB_OUTPUT
else
echo "is_latest=false" >> $GITHUB_OUTPUT
fi
nightly-release:
runs-on: ubuntu-latest
needs: check-latest-stable
if: ${{ needs.check-latest-stable.outputs.is_latest == 'true' }}
steps:
- name: Check actor permission
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
with:
require: write
- name: Set app env
run: |
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true
submodules: true
path: ${{ env.APP_NAME }}
- name: Get app version number
id: app-version
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
with:
filename: ${{ env.APP_NAME }}/appinfo/info.xml
expression: "//info//version/text()"
- name: Set APP_VERSION env
run: |
echo "APP_VERSION=${{ fromJSON(steps.app-version.outputs.result).version }}" >> $GITHUB_ENV
- name: Get appinfo data
id: appinfo
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
with:
filename: ${{ env.APP_NAME }}/appinfo/info.xml
expression: "//info//dependencies//nextcloud/@min-version"
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
# Continue if no package.json
continue-on-error: true
with:
path: ${{ env.APP_NAME }}
fallbackNode: '^20'
fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
- name: Get php version
id: php-versions
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2.3.1.3.2
with:
filename: ${{ env.APP_NAME }}/appinfo/info.xml
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: ${{ steps.php-versions.outputs.php-min }}
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer.json
id: check_composer
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
with:
files: "${{ env.APP_NAME }}/composer.json"
- name: Install composer dependencies
if: steps.check_composer.outputs.files_exists == 'true'
run: |
cd ${{ env.APP_NAME }}
composer install --no-dev
- name: Build ${{ env.APP_NAME }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
env:
CYPRESS_INSTALL_BINARY: 0
run: |
cd ${{ env.APP_NAME }}
npm ci
npm run build --if-present
- name: Check Krankerl config
id: krankerl
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
with:
files: ${{ env.APP_NAME }}/krankerl.toml
- name: Install Krankerl
if: steps.krankerl.outputs.files_exists == 'true'
run: |
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb
sudo dpkg -i krankerl_0.14.0_amd64.deb
- name: Package ${{ env.APP_NAME }} ${{ steps.version.outputs.version }} with krankerl
if: steps.krankerl.outputs.files_exists == 'true'
run: |
cd ${{ env.APP_NAME }}
krankerl package
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
continue-on-error: true
id: server-checkout
run: |
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
unzip latest-$NCVERSION.zip
- name: Checkout server master fallback
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ steps.server-checkout.outcome != 'success' }}
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
path: nextcloud
- name: Package ${{ env.APP_NAME }} ${{ steps.version.outputs.version }} with makefile
if: steps.krankerl.outputs.files_exists != 'true'
run: |
cd ${{ env.APP_NAME }}
# Setting up keys
mkdir -p build/tools/certificates/
echo '${{ secrets.APP_PRIVATE_KEY }}' > build/tools/certificates/${{ env.APP_NAME }}.key
make appstore verify-appstore-package
- name: Define nightly metadata
id: version
run: |
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
TAG="nightly"
echo "version=${{ env.APP_VERSION }}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo "branch=${BRANCH_NAME}" >> $GITHUB_OUTPUT
- name: Update nightly tag
run: |
cd ${{ env.APP_NAME }}
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
TAG="${{ steps.version.outputs.tag }}"
git tag -f "$TAG" "${GITHUB_SHA}"
git push -f origin "$TAG"
- name: Get recent commits for release notes
id: release-notes
run: |
cd ${{ env.APP_NAME }}
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null | grep -v nightly || echo "")
if [ -z "$LAST_TAG" ]; then
COMMITS=$(git log -10 --pretty=format:"- %s (%h)" --no-merges)
else
COMMITS=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s (%h)" --no-merges)
fi
cat << EOF > release-notes.md
## 🌙 Nightly Build - ${{ steps.version.outputs.version }}
Automated nightly build from \`${{ steps.version.outputs.branch }}\` branch.
⚠️ **Development version** - may contain bugs or unstable features.
### Recent Changes
$COMMITS
---
🤖 Generated from commit [\`${GITHUB_SHA:0:7}\`](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
EOF
echo "notes<<EOF" >> $GITHUB_OUTPUT
cat release-notes.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create or update GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.version.outputs.tag }}"
TITLE="Nightly ${{ steps.version.outputs.version }} (${{ steps.version.outputs.branch }})"
NOTES_FILE="${{ env.APP_NAME }}/release-notes.md"
if gh release view "$TAG" --repo "${{ github.repository }}" > /dev/null 2>&1; then
gh release edit "$TAG" \
--repo "${{ github.repository }}" \
--title "$TITLE" \
--notes-file "$NOTES_FILE" \
--prerelease
else
gh release create "$TAG" \
--repo "${{ github.repository }}" \
--title "$TITLE" \
--notes-file "$NOTES_FILE" \
--prerelease
fi
- name: Attach tarball to github release
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2.11.5
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}.tar.gz
asset_name: ${{ env.APP_NAME }}-${{ steps.version.outputs.tag }}.tar.gz
tag: ${{ steps.version.outputs.tag }}
overwrite: true
- name: Upload app to Nextcloud appstore (nightly)
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
with:
app_name: ${{ env.APP_NAME }}
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
nightly: true