Release v0.9.1 #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Publish a (pre)release to the Nextcloud App Store | |
| on: | |
| release: | |
| types: | |
| - prereleased | |
| - released | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| actions: write | |
| contents: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Validate Tag Format | |
| run: | | |
| sVersion="${{ github.event.release.tag_name }}" | |
| sPattern='^v?([0-9]+\.[0-9]+\.[0-9]+)(-RC\.[0-9]+)?$' | |
| if ! echo "${sVersion}" | grep --ignore-case --perl-regexp --silent "${sPattern}"; then | |
| sTitle='Invalid Version format' | |
| sMessage="Provided tag '${sVersion}' does not match expected pattern '${sPattern}'" | |
| echo "::error file=tag,line=0,endLine=0,title=${sTitle}::${sMessage}" | |
| exit 1 | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check versions in `appinfo/info.xml` | |
| run: | | |
| source ./bin/publish-to-nextcloud-store.sh | |
| sVersion="${{ github.event.release.tag_name }}" | |
| checkAppInfoVersion "${sVersion}" "${PWD}" | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| - uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: --no-dev | |
| working-directory: "solid/" | |
| - name: Publish to Nextcloud App Store | |
| shell: bash | |
| run: | | |
| source ./bin/publish-to-nextcloud-store.sh | |
| sNextcloudToken="${{ secrets.NEXTCLOUD_TOKEN }}" | |
| sVersion="${{ github.event.release.tag_name }}" | |
| sTarball="$(printf 'solid-%s.tar.gz' ${sVersion})" | |
| sKeyFile='nextcloud-app-store.key' | |
| checkAppInfoVersion "${sVersion}" "${PWD}" | |
| createTarball "${PWD}" "${sTarball}" | |
| sUploadUrl="$(fetchGitHubUploadUrl "${sVersion}" "${{ secrets.GITHUB_TOKEN }}")" | |
| sTarballUrl="$(uploadAssetToGitHub "${sUploadUrl}" "${{ secrets.GITHUB_TOKEN }}" "${sTarball}")" | |
| echo "${{ secrets.NEXTCLOUD_PRIVATE_KEY }}" > "${sKeyFile}" | |
| sSignature="$(createSignature "${sTarball}" "${sKeyFile}")" | |
| rm -f "${sKeyFile}" | |
| publishToNextcloud "${sTarballUrl}" "${sSignature}" "${sNextcloudToken}" |