From 78268afa09d8247987674f95c6c63e73fa325fcb Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Wed, 18 Feb 2026 08:08:30 +0100 Subject: [PATCH 1/5] Add three-tier release workflow files [skip ci] --- .github/workflows/pr-check.yaml | 32 +++++ .github/workflows/release-beta.yaml | 170 +++++++++++++++++++++++ .github/workflows/release-stable.yaml | 176 ++++++++++++++++++++++++ .github/workflows/release-unstable.yaml | 170 +++++++++++++++++++++++ .github/workflows/sync-beta.yaml | 60 ++++++++ .github/workflows/sync-dev.yaml | 59 ++++++++ 6 files changed, 667 insertions(+) create mode 100644 .github/workflows/pr-check.yaml create mode 100644 .github/workflows/release-beta.yaml create mode 100644 .github/workflows/release-stable.yaml create mode 100644 .github/workflows/release-unstable.yaml create mode 100644 .github/workflows/sync-beta.yaml create mode 100644 .github/workflows/sync-dev.yaml diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml new file mode 100644 index 00000000..1c264ed9 --- /dev/null +++ b/.github/workflows/pr-check.yaml @@ -0,0 +1,32 @@ +name: Branch Protection + +on: + pull_request: + branches: + - main + - beta + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - name: Check branch + run: | + TARGET="${{ github.base_ref }}" + SOURCE="${{ github.head_ref }}" + + if [[ "$TARGET" == "main" ]]; then + if [[ "$SOURCE" != "beta" ]] && ! [[ "$SOURCE" =~ ^hotfix ]]; then + echo "Error: Pull requests to main must come from 'beta' or a branch starting with 'hotfix'" + echo "Source branch: $SOURCE" + exit 1 + fi + elif [[ "$TARGET" == "beta" ]]; then + if [[ "$SOURCE" != "development" ]] && ! [[ "$SOURCE" =~ ^hotfix ]]; then + echo "Error: Pull requests to beta must come from 'development' or a branch starting with 'hotfix'" + echo "Source branch: $SOURCE" + exit 1 + fi + fi + + echo "Branch check passed: $SOURCE -> $TARGET" diff --git a/.github/workflows/release-beta.yaml b/.github/workflows/release-beta.yaml new file mode 100644 index 00000000..1ee77dc8 --- /dev/null +++ b/.github/workflows/release-beta.yaml @@ -0,0 +1,170 @@ +name: Beta Release + +on: + push: + branches: + - beta-release + +jobs: + release-management: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ssh-key: ${{ secrets.DEPLOY_KEY }} + + - name: Set app env + run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Get current version and append beta suffix + id: increment_version + run: | + git fetch origin main + main_version=$(git show origin/main:appinfo/info.xml | grep -oP '(?<=)[^<]+' || echo "") + current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") + + IFS='.' read -ra main_version_parts <<< "$main_version" + next_patch=$((main_version_parts[2] + 1)) + + beta_counter=1 + if [[ $current_version =~ -beta\.([0-9]+)$ ]]; then + current_patch=$(echo $current_version | grep -oP '^[0-9]+\.[0-9]+\.(\d+)' | cut -d. -f3) + if [ "$current_patch" -eq "$next_patch" ]; then + beta_counter=$((BASH_REMATCH[1] + 1)) + fi + fi + + beta_version="${main_version_parts[0]}.${main_version_parts[1]}.${next_patch}-beta.${beta_counter}" + echo "NEW_VERSION=$beta_version" >> $GITHUB_ENV + echo "new_version=$beta_version" >> $GITHUB_OUTPUT + echo "Main version: $main_version" + echo "Current version: $current_version" + echo "Using beta version: $beta_version" + + - name: Update version in info.xml + run: sed -i "s|.*|${{ env.NEW_VERSION }}|" appinfo/info.xml + + - name: Commit version update + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + if git diff --quiet && git diff --cached --quiet; then + echo "No changes to commit" + else + git add appinfo/info.xml + git commit -m "Bump beta version to ${{ env.NEW_VERSION }} [skip ci]" + git push + fi + + - name: Prepare Signing Certificate and Key + run: | + echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt + echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key + + - name: Install npm dependencies + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Set up PHP and install extensions + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: zip, gd + + - run: npm ci + - run: npm run build + - run: composer install --no-dev --optimize-autoloader --classmap-authoritative + + - name: Copy the package files into the package + run: | + mkdir -p package/${{ github.event.repository.name }} + rsync -av --progress \ + --exclude='/package' \ + --exclude='/.git' \ + --exclude='/.github' \ + --exclude='/.cursor' \ + --exclude='/.vscode' \ + --exclude='/node_modules' \ + --exclude='/src' \ + --exclude='/tests' \ + --exclude='/package.json' \ + --exclude='/package-lock.json' \ + --exclude='/composer.json' \ + --exclude='/composer.lock' \ + --exclude='/phpcs.xml' \ + --exclude='/phpmd.xml' \ + --exclude='/psalm.xml' \ + --exclude='/phpunit.xml' \ + --exclude='/.phpunit.cache' \ + --exclude='.phpunit.result.cache' \ + --exclude='/jest.config.js' \ + --exclude='/webpack.config.js' \ + --exclude='/tsconfig.json' \ + --exclude='/.babelrc' \ + --exclude='/.eslintrc.js' \ + --exclude='/.prettierrc' \ + --exclude='/stylelint.config.js' \ + --exclude='/.gitignore' \ + --exclude='/.gitattributes' \ + --exclude='/signing-key.key' \ + --exclude='/signing-cert.crt' \ + ./ package/${{ github.event.repository.name }}/ + + - name: Create Tarball + run: cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }} + + - name: Sign the TAR.GZ file with OpenSSL + run: openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature + + - name: Upload tarball as artifact + uses: actions/upload-artifact@v4 + with: + name: nextcloud-release-${{ env.NEW_VERSION }} + path: | + nextcloud-release.tar.gz + nextcloud-release.signature + retention-days: 30 + + - name: Git Version + id: version + uses: codacy/git-version@2.7.1 + with: + release-branch: beta-release + + - name: Upload Beta Release + uses: ncipollo/release-action@v1.12.0 + with: + tag: v${{ env.NEW_VERSION }} + name: Beta Release ${{ env.NEW_VERSION }} + draft: false + prerelease: true + skipIfReleaseExists: true + + - name: Attach tarball to GitHub release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: nextcloud-release.tar.gz + asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz + tag: v${{ env.NEW_VERSION }} + overwrite: true + + - name: Upload app to Nextcloud appstore + uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 + with: + app_name: ${{ env.APP_NAME }} + appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} + download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz + app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} + nightly: false + + - name: Verify release + run: | + echo "App version: ${{ env.NEW_VERSION }}" + echo "Tarball contents:" + tar -tvf nextcloud-release.tar.gz | head -50 + echo "info.xml contents:" + tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release-stable.yaml new file mode 100644 index 00000000..acf5bbb5 --- /dev/null +++ b/.github/workflows/release-stable.yaml @@ -0,0 +1,176 @@ +name: Release Workflow + +on: + push: + branches: + - main + workflow_dispatch: + inputs: + version: + description: 'Version to release (leave empty for auto-increment)' + required: false + default: '' + +jobs: + release-management: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ssh-key: ${{ secrets.DEPLOY_KEY }} + + - name: Set app env + run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Get current version and increment + id: increment_version + run: | + current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml) + IFS='.' read -ra version_parts <<< "$current_version" + ((version_parts[2]++)) + new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}" + echo "NEW_VERSION=$new_version" >> $GITHUB_ENV + echo "new_version=$new_version" >> $GITHUB_OUTPUT + + - name: Update version in info.xml + run: sed -i "s|.*|${{ env.NEW_VERSION }}|" appinfo/info.xml + + - name: Commit version update + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add appinfo/info.xml + git commit -m "Bump version to ${{ env.NEW_VERSION }} [skip ci]" + git push + + - name: Prepare Signing Certificate and Key + run: | + echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt + echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key + + - name: Install npm dependencies + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Set up PHP and install extensions + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: zip, gd + + - run: npm ci + - run: npm run build + - run: composer install --no-dev --optimize-autoloader --classmap-authoritative + + - name: Copy the package files into the package + run: | + mkdir -p package/${{ github.event.repository.name }} + rsync -av --progress \ + --exclude='/package' \ + --exclude='/.git' \ + --exclude='/.github' \ + --exclude='/.cursor' \ + --exclude='/.vscode' \ + --exclude='/node_modules' \ + --exclude='/src' \ + --exclude='/tests' \ + --exclude='/package.json' \ + --exclude='/package-lock.json' \ + --exclude='/composer.json' \ + --exclude='/composer.lock' \ + --exclude='/phpcs.xml' \ + --exclude='/phpmd.xml' \ + --exclude='/psalm.xml' \ + --exclude='/phpunit.xml' \ + --exclude='/.phpunit.cache' \ + --exclude='.phpunit.result.cache' \ + --exclude='/jest.config.js' \ + --exclude='/webpack.config.js' \ + --exclude='/tsconfig.json' \ + --exclude='/.babelrc' \ + --exclude='/.eslintrc.js' \ + --exclude='/.prettierrc' \ + --exclude='/stylelint.config.js' \ + --exclude='/.gitignore' \ + --exclude='/.gitattributes' \ + --exclude='/signing-key.key' \ + --exclude='/signing-cert.crt' \ + ./ package/${{ github.event.repository.name }}/ + + - name: Create Tarball + run: cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }} + + - name: Sign the TAR.GZ file with OpenSSL + run: openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature + + - name: Git Version + id: version + uses: codacy/git-version@2.7.1 + with: + release-branch: main + + - name: Upload Release + uses: ncipollo/release-action@v1.12.0 + with: + tag: v${{ env.NEW_VERSION }} + name: Release ${{ env.NEW_VERSION }} + draft: false + prerelease: false + skipIfReleaseExists: true + + - name: Attach tarball to GitHub release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: nextcloud-release.tar.gz + asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz + tag: v${{ env.NEW_VERSION }} + overwrite: true + + - name: Upload app to Nextcloud appstore + uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 + with: + app_name: ${{ env.APP_NAME }} + appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} + download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz + app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} + nightly: false + + - name: Verify release + run: | + echo "App version: ${{ env.NEW_VERSION }}" + echo "Tarball contents:" + tar -tvf nextcloud-release.tar.gz | head -50 + echo "info.xml contents:" + tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml + + update-changelog: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set app env + run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Get current version and increment + id: increment_version + run: | + current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml) + IFS='.' read -ra version_parts <<< "$current_version" + ((version_parts[2]++)) + new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}" + echo "NEW_VERSION=$new_version" >> $GITHUB_ENV + + - name: Run Changelog CI + if: github.ref == 'refs/heads/main' + uses: saadmk11/changelog-ci@v1.1.2 + with: + persist-credentials: true + release_version: ${{ env.NEW_VERSION }} + config_file: changelog-ci-config.json diff --git a/.github/workflows/release-unstable.yaml b/.github/workflows/release-unstable.yaml new file mode 100644 index 00000000..0ec729f2 --- /dev/null +++ b/.github/workflows/release-unstable.yaml @@ -0,0 +1,170 @@ +name: Unstable Release + +on: + push: + branches: + - development-release + +jobs: + release-management: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ssh-key: ${{ secrets.DEPLOY_KEY }} + + - name: Set app env + run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Get current version and append unstable suffix + id: increment_version + run: | + git fetch origin main + main_version=$(git show origin/main:appinfo/info.xml | grep -oP '(?<=)[^<]+' || echo "") + current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") + + IFS='.' read -ra main_version_parts <<< "$main_version" + next_patch=$((main_version_parts[2] + 1)) + + unstable_counter=1 + if [[ $current_version =~ -unstable\.([0-9]+)$ ]]; then + current_patch=$(echo $current_version | grep -oP '^[0-9]+\.[0-9]+\.(\d+)' | cut -d. -f3) + if [ "$current_patch" -eq "$next_patch" ]; then + unstable_counter=$((BASH_REMATCH[1] + 1)) + fi + fi + + unstable_version="${main_version_parts[0]}.${main_version_parts[1]}.${next_patch}-unstable.${unstable_counter}" + echo "NEW_VERSION=$unstable_version" >> $GITHUB_ENV + echo "new_version=$unstable_version" >> $GITHUB_OUTPUT + echo "Main version: $main_version" + echo "Current version: $current_version" + echo "Using unstable version: $unstable_version" + + - name: Update version in info.xml + run: sed -i "s|.*|${{ env.NEW_VERSION }}|" appinfo/info.xml + + - name: Commit version update + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + if git diff --quiet && git diff --cached --quiet; then + echo "No changes to commit" + else + git add appinfo/info.xml + git commit -m "Bump unstable version to ${{ env.NEW_VERSION }} [skip ci]" + git push + fi + + - name: Prepare Signing Certificate and Key + run: | + echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt + echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key + + - name: Install npm dependencies + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Set up PHP and install extensions + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: zip, gd + + - run: npm ci + - run: npm run build + - run: composer install --no-dev --optimize-autoloader --classmap-authoritative + + - name: Copy the package files into the package + run: | + mkdir -p package/${{ github.event.repository.name }} + rsync -av --progress \ + --exclude='/package' \ + --exclude='/.git' \ + --exclude='/.github' \ + --exclude='/.cursor' \ + --exclude='/.vscode' \ + --exclude='/node_modules' \ + --exclude='/src' \ + --exclude='/tests' \ + --exclude='/package.json' \ + --exclude='/package-lock.json' \ + --exclude='/composer.json' \ + --exclude='/composer.lock' \ + --exclude='/phpcs.xml' \ + --exclude='/phpmd.xml' \ + --exclude='/psalm.xml' \ + --exclude='/phpunit.xml' \ + --exclude='/.phpunit.cache' \ + --exclude='.phpunit.result.cache' \ + --exclude='/jest.config.js' \ + --exclude='/webpack.config.js' \ + --exclude='/tsconfig.json' \ + --exclude='/.babelrc' \ + --exclude='/.eslintrc.js' \ + --exclude='/.prettierrc' \ + --exclude='/stylelint.config.js' \ + --exclude='/.gitignore' \ + --exclude='/.gitattributes' \ + --exclude='/signing-key.key' \ + --exclude='/signing-cert.crt' \ + ./ package/${{ github.event.repository.name }}/ + + - name: Create Tarball + run: cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }} + + - name: Sign the TAR.GZ file with OpenSSL + run: openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature + + - name: Upload tarball as artifact + uses: actions/upload-artifact@v4 + with: + name: nextcloud-release-${{ env.NEW_VERSION }} + path: | + nextcloud-release.tar.gz + nextcloud-release.signature + retention-days: 30 + + - name: Git Version + id: version + uses: codacy/git-version@2.7.1 + with: + release-branch: development-release + + - name: Upload Unstable Release + uses: ncipollo/release-action@v1.12.0 + with: + tag: v${{ env.NEW_VERSION }} + name: Unstable Release ${{ env.NEW_VERSION }} + draft: false + prerelease: true + skipIfReleaseExists: true + + - name: Attach tarball to GitHub release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: nextcloud-release.tar.gz + asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz + tag: v${{ env.NEW_VERSION }} + overwrite: true + + - name: Upload app to Nextcloud appstore + uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 + with: + app_name: ${{ env.APP_NAME }} + appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} + download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz + app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} + nightly: true + + - name: Verify release + run: | + echo "App version: ${{ env.NEW_VERSION }}" + echo "Tarball contents:" + tar -tvf nextcloud-release.tar.gz | head -50 + echo "info.xml contents:" + tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml diff --git a/.github/workflows/sync-beta.yaml b/.github/workflows/sync-beta.yaml new file mode 100644 index 00000000..fdac64ce --- /dev/null +++ b/.github/workflows/sync-beta.yaml @@ -0,0 +1,60 @@ +name: Sync Beta to Beta-Release + +permissions: + contents: write + actions: write + +on: + push: + branches: + - beta + +jobs: + sync-to-beta-release: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.sha }} + ssh-key: ${{ secrets.DEPLOY_KEY }} + + - name: Configure Git SSH + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + git remote set-url origin git@github.com:${{ github.repository }}.git + + - name: Update beta-release branch + run: | + git fetch origin + + COMMIT_MSG=$(git log -1 --pretty=%B) + + # Preserve existing version on beta-release + BETA_RELEASE_VERSION="" + if git show-ref --quiet refs/remotes/origin/beta-release; then + git checkout origin/beta-release + BETA_RELEASE_VERSION=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") + echo "Found existing beta-release version: $BETA_RELEASE_VERSION" + fi + + # Reset or create beta-release from beta + if git show-ref --quiet refs/remotes/origin/beta-release; then + git checkout beta-release + git reset --hard origin/beta + else + git checkout -b beta-release origin/beta + fi + + # Restore preserved version + if [ ! -z "$BETA_RELEASE_VERSION" ]; then + sed -i "s|.*|${BETA_RELEASE_VERSION}|" appinfo/info.xml + git add appinfo/info.xml + git commit -m "${COMMIT_MSG} + + Restored beta-release version to ${BETA_RELEASE_VERSION} [skip ci]" + fi + + git push -f origin beta-release diff --git a/.github/workflows/sync-dev.yaml b/.github/workflows/sync-dev.yaml new file mode 100644 index 00000000..6b141154 --- /dev/null +++ b/.github/workflows/sync-dev.yaml @@ -0,0 +1,59 @@ +name: Sync Development to Development-Release + +permissions: + contents: write + +on: + push: + branches: + - development + +jobs: + sync-to-development-release: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.sha }} + ssh-key: ${{ secrets.DEPLOY_KEY }} + + - name: Configure Git SSH + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + git remote set-url origin git@github.com:${{ github.repository }}.git + + - name: Update development-release branch + run: | + git fetch origin + + COMMIT_MSG=$(git log -1 --pretty=%B) + + # Preserve existing version on development-release + DEV_RELEASE_VERSION="" + if git show-ref --quiet refs/remotes/origin/development-release; then + git checkout origin/development-release + DEV_RELEASE_VERSION=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") + echo "Found existing development-release version: $DEV_RELEASE_VERSION" + fi + + # Reset or create development-release from development + if git show-ref --quiet refs/remotes/origin/development-release; then + git checkout development-release + git reset --hard origin/development + else + git checkout -b development-release origin/development + fi + + # Restore preserved version + if [ ! -z "$DEV_RELEASE_VERSION" ]; then + sed -i "s|.*|${DEV_RELEASE_VERSION}|" appinfo/info.xml + git add appinfo/info.xml + git commit -m "${COMMIT_MSG} + + Restored development-release version to ${DEV_RELEASE_VERSION} [skip ci]" + fi + + git push -f origin development-release From c85c50c87e6585b95765e88713c747c0070b7efa Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 13 Mar 2026 16:51:41 +0100 Subject: [PATCH 2/5] chore: Remove old workflows superseded by centralized system --- .github/workflows/pr-check.yaml | 32 ----- .github/workflows/release-beta.yaml | 170 ----------------------- .github/workflows/release-stable.yaml | 176 ------------------------ .github/workflows/release-unstable.yaml | 170 ----------------------- .github/workflows/sync-beta.yaml | 60 -------- .github/workflows/sync-dev.yaml | 59 -------- 6 files changed, 667 deletions(-) delete mode 100644 .github/workflows/pr-check.yaml delete mode 100644 .github/workflows/release-beta.yaml delete mode 100644 .github/workflows/release-stable.yaml delete mode 100644 .github/workflows/release-unstable.yaml delete mode 100644 .github/workflows/sync-beta.yaml delete mode 100644 .github/workflows/sync-dev.yaml diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml deleted file mode 100644 index 1c264ed9..00000000 --- a/.github/workflows/pr-check.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Branch Protection - -on: - pull_request: - branches: - - main - - beta - -jobs: - check-branch: - runs-on: ubuntu-latest - steps: - - name: Check branch - run: | - TARGET="${{ github.base_ref }}" - SOURCE="${{ github.head_ref }}" - - if [[ "$TARGET" == "main" ]]; then - if [[ "$SOURCE" != "beta" ]] && ! [[ "$SOURCE" =~ ^hotfix ]]; then - echo "Error: Pull requests to main must come from 'beta' or a branch starting with 'hotfix'" - echo "Source branch: $SOURCE" - exit 1 - fi - elif [[ "$TARGET" == "beta" ]]; then - if [[ "$SOURCE" != "development" ]] && ! [[ "$SOURCE" =~ ^hotfix ]]; then - echo "Error: Pull requests to beta must come from 'development' or a branch starting with 'hotfix'" - echo "Source branch: $SOURCE" - exit 1 - fi - fi - - echo "Branch check passed: $SOURCE -> $TARGET" diff --git a/.github/workflows/release-beta.yaml b/.github/workflows/release-beta.yaml deleted file mode 100644 index 1ee77dc8..00000000 --- a/.github/workflows/release-beta.yaml +++ /dev/null @@ -1,170 +0,0 @@ -name: Beta Release - -on: - push: - branches: - - beta-release - -jobs: - release-management: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ssh-key: ${{ secrets.DEPLOY_KEY }} - - - name: Set app env - run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - - name: Get current version and append beta suffix - id: increment_version - run: | - git fetch origin main - main_version=$(git show origin/main:appinfo/info.xml | grep -oP '(?<=)[^<]+' || echo "") - current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") - - IFS='.' read -ra main_version_parts <<< "$main_version" - next_patch=$((main_version_parts[2] + 1)) - - beta_counter=1 - if [[ $current_version =~ -beta\.([0-9]+)$ ]]; then - current_patch=$(echo $current_version | grep -oP '^[0-9]+\.[0-9]+\.(\d+)' | cut -d. -f3) - if [ "$current_patch" -eq "$next_patch" ]; then - beta_counter=$((BASH_REMATCH[1] + 1)) - fi - fi - - beta_version="${main_version_parts[0]}.${main_version_parts[1]}.${next_patch}-beta.${beta_counter}" - echo "NEW_VERSION=$beta_version" >> $GITHUB_ENV - echo "new_version=$beta_version" >> $GITHUB_OUTPUT - echo "Main version: $main_version" - echo "Current version: $current_version" - echo "Using beta version: $beta_version" - - - name: Update version in info.xml - run: sed -i "s|.*|${{ env.NEW_VERSION }}|" appinfo/info.xml - - - name: Commit version update - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - if git diff --quiet && git diff --cached --quiet; then - echo "No changes to commit" - else - git add appinfo/info.xml - git commit -m "Bump beta version to ${{ env.NEW_VERSION }} [skip ci]" - git push - fi - - - name: Prepare Signing Certificate and Key - run: | - echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt - echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key - - - name: Install npm dependencies - uses: actions/setup-node@v3 - with: - node-version: '18.x' - - - name: Set up PHP and install extensions - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - extensions: zip, gd - - - run: npm ci - - run: npm run build - - run: composer install --no-dev --optimize-autoloader --classmap-authoritative - - - name: Copy the package files into the package - run: | - mkdir -p package/${{ github.event.repository.name }} - rsync -av --progress \ - --exclude='/package' \ - --exclude='/.git' \ - --exclude='/.github' \ - --exclude='/.cursor' \ - --exclude='/.vscode' \ - --exclude='/node_modules' \ - --exclude='/src' \ - --exclude='/tests' \ - --exclude='/package.json' \ - --exclude='/package-lock.json' \ - --exclude='/composer.json' \ - --exclude='/composer.lock' \ - --exclude='/phpcs.xml' \ - --exclude='/phpmd.xml' \ - --exclude='/psalm.xml' \ - --exclude='/phpunit.xml' \ - --exclude='/.phpunit.cache' \ - --exclude='.phpunit.result.cache' \ - --exclude='/jest.config.js' \ - --exclude='/webpack.config.js' \ - --exclude='/tsconfig.json' \ - --exclude='/.babelrc' \ - --exclude='/.eslintrc.js' \ - --exclude='/.prettierrc' \ - --exclude='/stylelint.config.js' \ - --exclude='/.gitignore' \ - --exclude='/.gitattributes' \ - --exclude='/signing-key.key' \ - --exclude='/signing-cert.crt' \ - ./ package/${{ github.event.repository.name }}/ - - - name: Create Tarball - run: cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }} - - - name: Sign the TAR.GZ file with OpenSSL - run: openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature - - - name: Upload tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: nextcloud-release-${{ env.NEW_VERSION }} - path: | - nextcloud-release.tar.gz - nextcloud-release.signature - retention-days: 30 - - - name: Git Version - id: version - uses: codacy/git-version@2.7.1 - with: - release-branch: beta-release - - - name: Upload Beta Release - uses: ncipollo/release-action@v1.12.0 - with: - tag: v${{ env.NEW_VERSION }} - name: Beta Release ${{ env.NEW_VERSION }} - draft: false - prerelease: true - skipIfReleaseExists: true - - - name: Attach tarball to GitHub release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: nextcloud-release.tar.gz - asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz - tag: v${{ env.NEW_VERSION }} - overwrite: true - - - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 - with: - app_name: ${{ env.APP_NAME }} - appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} - download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz - app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} - nightly: false - - - name: Verify release - run: | - echo "App version: ${{ env.NEW_VERSION }}" - echo "Tarball contents:" - tar -tvf nextcloud-release.tar.gz | head -50 - echo "info.xml contents:" - tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release-stable.yaml deleted file mode 100644 index acf5bbb5..00000000 --- a/.github/workflows/release-stable.yaml +++ /dev/null @@ -1,176 +0,0 @@ -name: Release Workflow - -on: - push: - branches: - - main - workflow_dispatch: - inputs: - version: - description: 'Version to release (leave empty for auto-increment)' - required: false - default: '' - -jobs: - release-management: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ssh-key: ${{ secrets.DEPLOY_KEY }} - - - name: Set app env - run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - - name: Get current version and increment - id: increment_version - run: | - current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml) - IFS='.' read -ra version_parts <<< "$current_version" - ((version_parts[2]++)) - new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}" - echo "NEW_VERSION=$new_version" >> $GITHUB_ENV - echo "new_version=$new_version" >> $GITHUB_OUTPUT - - - name: Update version in info.xml - run: sed -i "s|.*|${{ env.NEW_VERSION }}|" appinfo/info.xml - - - name: Commit version update - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add appinfo/info.xml - git commit -m "Bump version to ${{ env.NEW_VERSION }} [skip ci]" - git push - - - name: Prepare Signing Certificate and Key - run: | - echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt - echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key - - - name: Install npm dependencies - uses: actions/setup-node@v3 - with: - node-version: '18.x' - - - name: Set up PHP and install extensions - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - extensions: zip, gd - - - run: npm ci - - run: npm run build - - run: composer install --no-dev --optimize-autoloader --classmap-authoritative - - - name: Copy the package files into the package - run: | - mkdir -p package/${{ github.event.repository.name }} - rsync -av --progress \ - --exclude='/package' \ - --exclude='/.git' \ - --exclude='/.github' \ - --exclude='/.cursor' \ - --exclude='/.vscode' \ - --exclude='/node_modules' \ - --exclude='/src' \ - --exclude='/tests' \ - --exclude='/package.json' \ - --exclude='/package-lock.json' \ - --exclude='/composer.json' \ - --exclude='/composer.lock' \ - --exclude='/phpcs.xml' \ - --exclude='/phpmd.xml' \ - --exclude='/psalm.xml' \ - --exclude='/phpunit.xml' \ - --exclude='/.phpunit.cache' \ - --exclude='.phpunit.result.cache' \ - --exclude='/jest.config.js' \ - --exclude='/webpack.config.js' \ - --exclude='/tsconfig.json' \ - --exclude='/.babelrc' \ - --exclude='/.eslintrc.js' \ - --exclude='/.prettierrc' \ - --exclude='/stylelint.config.js' \ - --exclude='/.gitignore' \ - --exclude='/.gitattributes' \ - --exclude='/signing-key.key' \ - --exclude='/signing-cert.crt' \ - ./ package/${{ github.event.repository.name }}/ - - - name: Create Tarball - run: cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }} - - - name: Sign the TAR.GZ file with OpenSSL - run: openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature - - - name: Git Version - id: version - uses: codacy/git-version@2.7.1 - with: - release-branch: main - - - name: Upload Release - uses: ncipollo/release-action@v1.12.0 - with: - tag: v${{ env.NEW_VERSION }} - name: Release ${{ env.NEW_VERSION }} - draft: false - prerelease: false - skipIfReleaseExists: true - - - name: Attach tarball to GitHub release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: nextcloud-release.tar.gz - asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz - tag: v${{ env.NEW_VERSION }} - overwrite: true - - - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 - with: - app_name: ${{ env.APP_NAME }} - appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} - download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz - app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} - nightly: false - - - name: Verify release - run: | - echo "App version: ${{ env.NEW_VERSION }}" - echo "Tarball contents:" - tar -tvf nextcloud-release.tar.gz | head -50 - echo "info.xml contents:" - tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml - - update-changelog: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set app env - run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - - name: Get current version and increment - id: increment_version - run: | - current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml) - IFS='.' read -ra version_parts <<< "$current_version" - ((version_parts[2]++)) - new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}" - echo "NEW_VERSION=$new_version" >> $GITHUB_ENV - - - name: Run Changelog CI - if: github.ref == 'refs/heads/main' - uses: saadmk11/changelog-ci@v1.1.2 - with: - persist-credentials: true - release_version: ${{ env.NEW_VERSION }} - config_file: changelog-ci-config.json diff --git a/.github/workflows/release-unstable.yaml b/.github/workflows/release-unstable.yaml deleted file mode 100644 index 0ec729f2..00000000 --- a/.github/workflows/release-unstable.yaml +++ /dev/null @@ -1,170 +0,0 @@ -name: Unstable Release - -on: - push: - branches: - - development-release - -jobs: - release-management: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ssh-key: ${{ secrets.DEPLOY_KEY }} - - - name: Set app env - run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - - name: Get current version and append unstable suffix - id: increment_version - run: | - git fetch origin main - main_version=$(git show origin/main:appinfo/info.xml | grep -oP '(?<=)[^<]+' || echo "") - current_version=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") - - IFS='.' read -ra main_version_parts <<< "$main_version" - next_patch=$((main_version_parts[2] + 1)) - - unstable_counter=1 - if [[ $current_version =~ -unstable\.([0-9]+)$ ]]; then - current_patch=$(echo $current_version | grep -oP '^[0-9]+\.[0-9]+\.(\d+)' | cut -d. -f3) - if [ "$current_patch" -eq "$next_patch" ]; then - unstable_counter=$((BASH_REMATCH[1] + 1)) - fi - fi - - unstable_version="${main_version_parts[0]}.${main_version_parts[1]}.${next_patch}-unstable.${unstable_counter}" - echo "NEW_VERSION=$unstable_version" >> $GITHUB_ENV - echo "new_version=$unstable_version" >> $GITHUB_OUTPUT - echo "Main version: $main_version" - echo "Current version: $current_version" - echo "Using unstable version: $unstable_version" - - - name: Update version in info.xml - run: sed -i "s|.*|${{ env.NEW_VERSION }}|" appinfo/info.xml - - - name: Commit version update - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - if git diff --quiet && git diff --cached --quiet; then - echo "No changes to commit" - else - git add appinfo/info.xml - git commit -m "Bump unstable version to ${{ env.NEW_VERSION }} [skip ci]" - git push - fi - - - name: Prepare Signing Certificate and Key - run: | - echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt - echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key - - - name: Install npm dependencies - uses: actions/setup-node@v3 - with: - node-version: '18.x' - - - name: Set up PHP and install extensions - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - extensions: zip, gd - - - run: npm ci - - run: npm run build - - run: composer install --no-dev --optimize-autoloader --classmap-authoritative - - - name: Copy the package files into the package - run: | - mkdir -p package/${{ github.event.repository.name }} - rsync -av --progress \ - --exclude='/package' \ - --exclude='/.git' \ - --exclude='/.github' \ - --exclude='/.cursor' \ - --exclude='/.vscode' \ - --exclude='/node_modules' \ - --exclude='/src' \ - --exclude='/tests' \ - --exclude='/package.json' \ - --exclude='/package-lock.json' \ - --exclude='/composer.json' \ - --exclude='/composer.lock' \ - --exclude='/phpcs.xml' \ - --exclude='/phpmd.xml' \ - --exclude='/psalm.xml' \ - --exclude='/phpunit.xml' \ - --exclude='/.phpunit.cache' \ - --exclude='.phpunit.result.cache' \ - --exclude='/jest.config.js' \ - --exclude='/webpack.config.js' \ - --exclude='/tsconfig.json' \ - --exclude='/.babelrc' \ - --exclude='/.eslintrc.js' \ - --exclude='/.prettierrc' \ - --exclude='/stylelint.config.js' \ - --exclude='/.gitignore' \ - --exclude='/.gitattributes' \ - --exclude='/signing-key.key' \ - --exclude='/signing-cert.crt' \ - ./ package/${{ github.event.repository.name }}/ - - - name: Create Tarball - run: cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }} - - - name: Sign the TAR.GZ file with OpenSSL - run: openssl dgst -sha512 -sign signing-key.key nextcloud-release.tar.gz | openssl base64 -out nextcloud-release.signature - - - name: Upload tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: nextcloud-release-${{ env.NEW_VERSION }} - path: | - nextcloud-release.tar.gz - nextcloud-release.signature - retention-days: 30 - - - name: Git Version - id: version - uses: codacy/git-version@2.7.1 - with: - release-branch: development-release - - - name: Upload Unstable Release - uses: ncipollo/release-action@v1.12.0 - with: - tag: v${{ env.NEW_VERSION }} - name: Unstable Release ${{ env.NEW_VERSION }} - draft: false - prerelease: true - skipIfReleaseExists: true - - - name: Attach tarball to GitHub release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: nextcloud-release.tar.gz - asset_name: ${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz - tag: v${{ env.NEW_VERSION }} - overwrite: true - - - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 - with: - app_name: ${{ env.APP_NAME }} - appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} - download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz - app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} - nightly: true - - - name: Verify release - run: | - echo "App version: ${{ env.NEW_VERSION }}" - echo "Tarball contents:" - tar -tvf nextcloud-release.tar.gz | head -50 - echo "info.xml contents:" - tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml diff --git a/.github/workflows/sync-beta.yaml b/.github/workflows/sync-beta.yaml deleted file mode 100644 index fdac64ce..00000000 --- a/.github/workflows/sync-beta.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Sync Beta to Beta-Release - -permissions: - contents: write - actions: write - -on: - push: - branches: - - beta - -jobs: - sync-to-beta-release: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.sha }} - ssh-key: ${{ secrets.DEPLOY_KEY }} - - - name: Configure Git SSH - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - git remote set-url origin git@github.com:${{ github.repository }}.git - - - name: Update beta-release branch - run: | - git fetch origin - - COMMIT_MSG=$(git log -1 --pretty=%B) - - # Preserve existing version on beta-release - BETA_RELEASE_VERSION="" - if git show-ref --quiet refs/remotes/origin/beta-release; then - git checkout origin/beta-release - BETA_RELEASE_VERSION=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") - echo "Found existing beta-release version: $BETA_RELEASE_VERSION" - fi - - # Reset or create beta-release from beta - if git show-ref --quiet refs/remotes/origin/beta-release; then - git checkout beta-release - git reset --hard origin/beta - else - git checkout -b beta-release origin/beta - fi - - # Restore preserved version - if [ ! -z "$BETA_RELEASE_VERSION" ]; then - sed -i "s|.*|${BETA_RELEASE_VERSION}|" appinfo/info.xml - git add appinfo/info.xml - git commit -m "${COMMIT_MSG} - - Restored beta-release version to ${BETA_RELEASE_VERSION} [skip ci]" - fi - - git push -f origin beta-release diff --git a/.github/workflows/sync-dev.yaml b/.github/workflows/sync-dev.yaml deleted file mode 100644 index 6b141154..00000000 --- a/.github/workflows/sync-dev.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: Sync Development to Development-Release - -permissions: - contents: write - -on: - push: - branches: - - development - -jobs: - sync-to-development-release: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.sha }} - ssh-key: ${{ secrets.DEPLOY_KEY }} - - - name: Configure Git SSH - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - git remote set-url origin git@github.com:${{ github.repository }}.git - - - name: Update development-release branch - run: | - git fetch origin - - COMMIT_MSG=$(git log -1 --pretty=%B) - - # Preserve existing version on development-release - DEV_RELEASE_VERSION="" - if git show-ref --quiet refs/remotes/origin/development-release; then - git checkout origin/development-release - DEV_RELEASE_VERSION=$(grep -oP '(?<=)[^<]+' appinfo/info.xml || echo "") - echo "Found existing development-release version: $DEV_RELEASE_VERSION" - fi - - # Reset or create development-release from development - if git show-ref --quiet refs/remotes/origin/development-release; then - git checkout development-release - git reset --hard origin/development - else - git checkout -b development-release origin/development - fi - - # Restore preserved version - if [ ! -z "$DEV_RELEASE_VERSION" ]; then - sed -i "s|.*|${DEV_RELEASE_VERSION}|" appinfo/info.xml - git add appinfo/info.xml - git commit -m "${COMMIT_MSG} - - Restored development-release version to ${DEV_RELEASE_VERSION} [skip ci]" - fi - - git push -f origin development-release From b208f596b17a3e6d777a9a1f98dec0e337b231dd Mon Sep 17 00:00:00 2001 From: rubenvdlinde Date: Fri, 5 Jun 2026 06:37:26 +0200 Subject: [PATCH 3/5] ci: drive beta releases via semantic-release prerelease channel [skip ci] --- .forgejo/workflows/release-beta.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .forgejo/workflows/release-beta.yml diff --git a/.forgejo/workflows/release-beta.yml b/.forgejo/workflows/release-beta.yml new file mode 100644 index 00000000..ca8c56b6 --- /dev/null +++ b/.forgejo/workflows/release-beta.yml @@ -0,0 +1,13 @@ +name: Beta Release + +on: + push: + branches: [beta] + workflow_dispatch: + +jobs: + release: + uses: Conduction/.github/.forgejo/workflows/release-semrel-beta.yml@main + with: + app-name: softwarecatalog + secrets: inherit From 6a55b720d40420bb11c9bdda3e6983b8af9993bd Mon Sep 17 00:00:00 2001 From: Conduction Release Bot Date: Tue, 16 Jun 2026 06:10:25 +0200 Subject: [PATCH 4/5] ci: restore beta semrel release caller (revert dev-merge clobber) --- .forgejo/workflows/release-beta.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/release-beta.yml b/.forgejo/workflows/release-beta.yml index 01e52add..ca8c56b6 100644 --- a/.forgejo/workflows/release-beta.yml +++ b/.forgejo/workflows/release-beta.yml @@ -7,11 +7,7 @@ on: jobs: release: - uses: https://codeberg.org/Conduction/.github/.forgejo/workflows/release-beta.yml@main + uses: Conduction/.github/.forgejo/workflows/release-semrel-beta.yml@main with: app-name: softwarecatalog - secrets: - CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }} - NEXTCLOUD_SIGNING_KEY: ${{ secrets.NEXTCLOUD_SIGNING_KEY }} - NEXTCLOUD_SIGNING_CERT: ${{ secrets.NEXTCLOUD_SIGNING_CERT }} - NEXTCLOUD_APPSTORE_TOKEN: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }} + secrets: inherit From eae2ddff5b4b91cdc87dd73920d2e1df291cd7ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 10:55:51 +0200 Subject: [PATCH 5/5] chore(release): 0.1.142-beta.20260820200443 [skip ci] (#581) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- appinfo/info.xml | 2 +- openapi.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 327d81b8..21a240b8 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -50,7 +50,7 @@ Vrij en open source onder de EUPL-licentie. **Ondersteuning:** Voor ondersteuning, neem contact op via support@conduction.nl. Voor een Service Level Agreement (SLA), neem contact op via sales@conduction.nl. ]]> - 0.1.141-unstable.20260820125107 + 0.1.142-beta.20260820200443 EUPL-1.2 Conduction SoftwareCatalog diff --git a/openapi.json b/openapi.json index 58b9fb46..1d734b50 100644 --- a/openapi.json +++ b/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "softwarecatalog", - "version": "0.1.141-unstable.20260820125107", + "version": "0.1.142-beta.20260820200443", "description": "Software Catalog", "license": { "name": "agpl"