Add complete CI/CD pipeline for automated Astrolabe app releases: - GitHub Actions workflow for build, sign, and publish - Makefile for app store package creation - Version synchronization between info.xml and package.json - CHANGELOG.md with v0.1.0 release notes feat: configure commitizen monorepo with independent versioning Enable independent versioning for three components using scope-based commits: - MCP Server (feat(mcp) or unscoped): v* tags, updates pyproject.toml + Chart.yaml:appVersion - Helm Chart (feat(helm)): nextcloud-mcp-server-* tags, updates Chart.yaml:version - Astrolabe App (feat(astrolabe)): astrolabe-v* tags, updates info.xml + package.json Changes: - Add .cz.toml configs for Astrolabe and Helm chart - Update root pyproject.toml with scope filtering and tag ignores - Create bump helper scripts (bump-mcp.sh, bump-helm.sh, bump-astrolabe.sh) - Add CONTRIBUTING.md with version management documentation - Create component-specific changelogs - Configure appVersion/version separation for Helm chart This allows each component to release independently while maintaining proper version tracking and changelog generation.
85 lines
2.7 KiB
YAML
85 lines
2.7 KiB
YAML
name: Build and Publish Astrolabe App Release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
env:
|
|
APP_NAME: astrolabe
|
|
APP_DIR: third_party/astrolabe
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get version from tag
|
|
id: tag
|
|
run: |
|
|
echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Validate version in info.xml matches tag
|
|
working-directory: ${{ env.APP_DIR }}
|
|
run: |
|
|
INFO_VERSION=$(sed -n 's/.*<version>\(.*\)<\/version>.*/\1/p' appinfo/info.xml | tr -d '\t')
|
|
if [ "$INFO_VERSION" != "${{ steps.tag.outputs.TAG }}" ]; then
|
|
echo "Version mismatch: info.xml has $INFO_VERSION but tag is ${{ steps.tag.outputs.TAG }}"
|
|
exit 1
|
|
fi
|
|
echo "Version validated: $INFO_VERSION"
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: 8.1
|
|
coverage: none
|
|
|
|
- name: Checkout Nextcloud server (for signing)
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: nextcloud/server
|
|
ref: stable30
|
|
path: server
|
|
|
|
- name: Install dependencies and build
|
|
working-directory: ${{ env.APP_DIR }}
|
|
run: |
|
|
composer install --no-dev --optimize-autoloader
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Setup signing certificate
|
|
run: |
|
|
mkdir -p $HOME/.nextcloud/certificates
|
|
echo "${{ secrets.APP_PRIVATE_KEY }}" > $HOME/.nextcloud/certificates/${{ env.APP_NAME }}.key
|
|
echo "${{ secrets.APP_PUBLIC_CRT }}" > $HOME/.nextcloud/certificates/${{ env.APP_NAME }}.crt
|
|
|
|
- name: Build app store package
|
|
working-directory: ${{ env.APP_DIR }}
|
|
run: make appstore
|
|
|
|
- name: Attach tarball to GitHub release
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: ${{ env.APP_DIR }}/build/artifacts/${{ env.APP_NAME }}.tar.gz
|
|
asset_name: ${{ env.APP_NAME }}-${{ steps.tag.outputs.TAG }}.tar.gz
|
|
tag: ${{ github.ref }}
|
|
|
|
- name: Upload to Nextcloud App Store
|
|
uses: R0Wi/nextcloud-appstore-push-action@v1.0.6
|
|
with:
|
|
app_name: ${{ env.APP_NAME }}
|
|
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
|
|
download_url: ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/${{ env.APP_NAME }}-${{ steps.tag.outputs.TAG }}.tar.gz
|
|
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
nightly: ${{ github.event.release.prerelease }}
|