Skip to content

Commit

Permalink
Merge tag 'feature/configuration' into feature/PC388-15/dashboard-wid…
Browse files Browse the repository at this point in the history
…gets
  • Loading branch information
remko48 committed Oct 23, 2024
2 parents 06e0108 + fc398ee commit 3bbdd52
Show file tree
Hide file tree
Showing 4 changed files with 258 additions and 54 deletions.
196 changes: 196 additions & 0 deletions .github/workflows/release-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
name: Release Workflow

on:
push:
branches:
- master
- main
workflow_dispatch:
inputs:
version:
description: 'Version to release (leave empty to use info.xml version)'
required: false
default: ''

jobs:
release-management:
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 '(?<=<version>)[^<]+' 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|<version>.*</version>|<version>${{ env.NEW_VERSION }}</version>|" appinfo/info.xml
- name: Commit version update
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Bump version to ${{ env.NEW_VERSION }}"
git push
# Step 1: Prepare the signing certificate and key
- name: Prepare Signing Certificate and Key
run: |
echo "${{ secrets.NEXTCLOUD_SIGNING_CERT }}" > signing-cert.crt
echo "${{ secrets.NEXTCLOUD_SIGNING_KEY }}" > signing-key.key
# Step 3: Install Node.js dependencies using npm
- name: Install npm dependencies
uses: actions/setup-node@v3
with:
node-version: '18.x' # Specify Node.js version

# Step 4: Install PHP extensions
- name: Set up PHP and install extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: zip, gd

# Step 5: Build the node dependencies
- run: npm ci

# Step 6: Build the node dependencies
- run: npm run build

# Step 7: Build composer dependencies
- run: composer i --no-dev

# Step 8: Copy the files into the package directory
- 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='.vscode' \
--exclude='docker' \
--exclude='docs' \
--exclude='node_modules' \
--exclude='/src' \
--exclude='test' \
--exclude='package-lock.json' \
--exclude='composer.lock' \
--exclude='composer-setup.php' \
--exclude='.phpunit.result.cache' \
--exclude='phpmd.xml' \
--exclude='signing-key.key' \
--exclude='package.json' \
--exclude='composer.json' \
--exclude='coverage.txt' \
--exclude='signing-cert.crt' \
--exclude='docker-compose.yml' \
--exclude='webpack.config.js' \
--exclude='.prettierrc' \
--exclude='psalm.xml' \
--exclude='phpunit.xml' \
--exclude='tsconfig.json' \
--exclude='changelog-ci-config.json' \
--exclude='jest.config.js' \
--exclude='.gitattributes' \
--exclude='.php-cs-fixer.dist.php' \
--exclude='.gitignore' \
--exclude='.eslintrc.js' \
--exclude='stylelint.config.js' \
--exclude='.babelrc' \
--exclude='.nvmrc' \
./ package/${{ github.event.repository.name }}/
# Step 9: Create the TAR.GZ archive
- name: Create Tarball
run: |
cd package && tar -czf ../nextcloud-release.tar.gz ${{ github.event.repository.name }}
# Step 10: Sign the TAR.GZ file with OpenSSL
- 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
# Step 11: Generate Git version information
- name: Git Version
id: version
uses: codacy/[email protected]
with:
release-branch: main

# Step 12: Extract repository description
- name: Extract repository description
id: repo-description
run: |
description=$(jq -r '.description' <(curl -s https://api.github.com/repos/${{ github.repository }}))
echo "REPO_DESCRIPTION=$description" >> $GITHUB_ENV
# Step 13: Run Changelog CI
- name: Run Changelog CI
if: github.ref == 'refs/heads/main'
uses: saadmk11/[email protected]
with:
release_version: ${{ env.NEW_VERSION }}
config_file: changelog-ci-config.json

# Step 14: Output the version
- name: Use the version
run: |
echo ${{ steps.version.outputs.version }}
# Step 15: Copy the package files into the package (this step seems redundant, consider removing)
- name: Copy the package files into the package
run: |
mkdir -p package/${{ github.event.repository.name }}
rsync -av --progress --exclude='package' --exclude='.git' ./ package/${{ github.event.repository.name }}/
# Step 18: Create a new release on GitHub
- name: Upload Release
uses: ncipollo/[email protected]
with:
tag: v${{ env.NEW_VERSION }}
name: Release ${{ env.NEW_VERSION }}
draft: false
prerelease: false

- name: Attach tarball to github release
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: nextcloud-release.tar.gz # Corrected spelling
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 # v1
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 version and contents
run: |
echo "App version: ${{ env.NEW_VERSION }}"
echo "Tarball contents:"
tar -tvf nextcloud-release.tar.gz
echo "info.xml contents:"
tar -xOf nextcloud-release.tar.gz ${{ env.APP_NAME }}/appinfo/info.xml
26 changes: 26 additions & 0 deletions .nextcloud/certificates/zaakafhandelapp.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIEXzCCAkcCAQAwGjEYMBYGA1UEAwwPemFha2FmaGFuZGVsYXBwMIICIjANBgkq
hkiG9w0BAQEFAAOCAg8AMIICCgK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8bwN3HEmZiyQJ1GF7SCQsos6hncJUed+5iIrdyGnfzq8K2AFkBoCsqZfCvUoSSt7
UmJKVP1ZjQP225P178flK+3IVeVPtUD6QbMPRLlgQrh1y+rY4e7Pnk45trOrIICU
KQcbl65TWiaZOgsbll3t+kvXw8N/7fgeeyNe26IgQGvJCSJfMiLKiezNdFkIucsa
NsMiSvln4ims3+ZNicShV0qBG+rcFSsuhM+JpM0+k8tb8iyHeKAhgNWw6PodqIRv
AFak6fR0uK0O/roI+VTDy2SXYE2Dbn4yWEBKVovN8zq2he8rmEVNiyptKKFw03s2
3StYdcaZetHMu9a8kQQ1vAwL4g==
-----END CERTIFICATE REQUEST-----
74 changes: 25 additions & 49 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,49 +1,25 @@
<?xml version="1.0"?>
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>zaakafhandelapp</id>
<name>Zaak Afhandel App</name>
<summary>This is a the ZAA (Zaak Afhandel App) in english Case Handling App that is made by ConductionN</summary>
<description><![CDATA[📰 Brinning Gateway and Service bus functionality to nextcloud
The OpenCatalogi Nextcloud app provides a framework for federated catalogi to work together in an open data ecosystem
- 📲 Synchronize your data sources
- 📰 Send cloud eventt
- 🆓 Map and translate api calls
**System Cron is currently required for this app to work**
Requirements can be found [here](https://conduction.gitbook.io/opencatalogi-nextcloud/installatie)
The Roadmap is available [here](https://github.com/orgs/OpenCatalogi/projects/1/views/2)
Create a [bug report](https://github.com/OpenCatalogi/.github/issues/new/choose)
Create a [feature request](https://github.com/OpenCatalogi/.github/issues/new/choose)
]]></description>
<version>0.1.1</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://www.conduction.nl/">Conduction</author>
<namespace>ZaakAfhandelApp</namespace>
<category>organisation</category>
<website>https://github.com/ConductionNL/zaakafhandelapp</website>
<bugs>https://github.com/ConductionNL/zaakafhandelapp/issues</bugs>
<repository type="git">https://github.com/ConductionNL/zaakafhandelapp.git</repository>
<dependencies>
<php min-version="8.0" min-int-size="64"/>
<database min-version="10">pgsql</database>
<database>sqlite</database>
<database min-version="8.0">mysql</database>

<owncloud max-version="0" min-version="0"/>
<nextcloud min-version="28" max-version="30"/>
</dependencies>
<navigations>
<navigation>
<id>zaakafhandelapp</id>
<name>Zaak Afhandel App</name>
<route>zaakafhandelapp.dashboard.page</route>
</navigation>
</navigations>
</info>
<?xml version="1.0"?>
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>zaakafhandelapp</id>
<name>ZaakAfhandelapp</name>
<summary>ZAA</summary>
<description>This is a the ZAA (Zaak Afhandel App) in English Case Handling App that is made by ConductionNL for the Nextcloud eco</description>
<version>0.0.6</version>
<licence>agpl</licence>
<category>organization</category>
<author mail="[email protected]" homepage="https://conduction.nl/">Conduction</author>
<namespace>ZaakAfhandelapp</namespace>
<bugs>https://github.com/ConductionNL/zaakafhandelapp/issues</bugs>
<dependencies>
<nextcloud min-version="26" max-version="30"/>
</dependencies>
<navigations>
<navigation>
<id>zaakafhandelapp</id>
<name>ZaakAfhandelapp</name>
<route>zaakafhandelapp.dashboard.page</route>
<icon>app.svg</icon>
</navigation>
</navigations>
</info>
16 changes: 11 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nextcloud/zaakafhandelapp",
"description": "This nextcloud app provid a basic zaak afhandel component for dutch governemental institutions",
"license": "AGPL-3.0-or-later",
"name": "conductionnl/zaakafhandelapp",
"description": "Manage your live roleplaying setting",
"license": "AGPL-3.0-or-later",
"authors": [
{
"name": "Conduction b.v.",
Expand Down Expand Up @@ -39,16 +39,22 @@
"openapi": "generate-spec"
},
"require": {
"php": "^8.1",
"adbario/php-dot-notation": "^3.3.0",
"bamarni/composer-bin-plugin": "^1.8",
"php": "^8.1"
"elasticsearch/elasticsearch": "^v8.14.0",
"adbario/php-dot-notation": "^3.3.0",
"guzzlehttp/guzzle": "^7.0",
"symfony/uid": "^6.4"
},
"require-dev": {
"nextcloud/ocp": "dev-stable29",
"roave/security-advisories": "dev-latest"
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
"bamarni/composer-bin-plugin": true,
"php-http/discovery": true
},
"optimize-autoloader": true,
"sort-packages": true,
Expand Down

0 comments on commit 3bbdd52

Please sign in to comment.