2023-06-27 12:47:16 +00:00
|
|
|
name: repod
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2023-12-23 22:56:29 +00:00
|
|
|
xml:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-24 06:42:48 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-23 22:56:29 +00:00
|
|
|
- run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
|
|
|
|
- uses: ChristophWurst/xmllint-action@v1
|
|
|
|
with:
|
|
|
|
xml-file: ./appinfo/info.xml
|
|
|
|
xml-schema-file: ./info.xsd
|
|
|
|
|
|
|
|
php:
|
2023-06-27 12:47:16 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-09-19 06:34:06 +00:00
|
|
|
container: nextcloud:30
|
2023-06-27 12:47:16 +00:00
|
|
|
steps:
|
2024-10-24 21:57:01 +00:00
|
|
|
- run: apt-get update
|
|
|
|
- run: apt-get install -y git nodejs
|
2023-12-24 06:42:48 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-27 12:47:16 +00:00
|
|
|
- run: curl -sSLo /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
|
|
|
|
- run: chmod +x /usr/local/bin/composer
|
|
|
|
- run: composer install
|
|
|
|
- run: composer run lint
|
|
|
|
- run: composer run cs:check
|
2024-05-29 15:11:53 +00:00
|
|
|
- run: composer run psalm
|
2023-06-27 12:47:16 +00:00
|
|
|
|
|
|
|
nodejs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-24 06:42:48 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-02-02 06:59:01 +00:00
|
|
|
- uses: skjnldsv/read-package-engines-version-actions@v3
|
2023-07-02 14:32:05 +00:00
|
|
|
id: versions
|
|
|
|
with:
|
2024-05-29 15:11:53 +00:00
|
|
|
fallbackNode: '^20'
|
|
|
|
fallbackNpm: '^10'
|
2023-12-24 06:42:52 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2023-07-02 14:32:05 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
|
|
- run: npm i -g npm@${{ steps.versions.outputs.npmVersion }}
|
2023-06-27 12:52:09 +00:00
|
|
|
- run: npm ci
|
2023-06-27 12:47:16 +00:00
|
|
|
- run: npm run lint
|
|
|
|
- run: npm run stylelint
|
|
|
|
- run: npm run build
|
2024-01-11 07:56:30 +00:00
|
|
|
|
|
|
|
release:
|
2024-01-15 17:07:37 +00:00
|
|
|
if: gitea.ref_type == 'tag'
|
2024-01-11 07:56:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-09-19 06:34:06 +00:00
|
|
|
container: nextcloud:30
|
2024-01-11 07:56:30 +00:00
|
|
|
steps:
|
2024-10-24 21:57:01 +00:00
|
|
|
- run: apt-get update
|
|
|
|
- run: apt-get install -y git nodejs
|
2024-01-11 07:56:30 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: curl -sSLo /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
|
|
|
|
- run: chmod +x /usr/local/bin/composer
|
2024-02-02 06:59:01 +00:00
|
|
|
- uses: skjnldsv/read-package-engines-version-actions@v3
|
2024-01-11 07:56:30 +00:00
|
|
|
id: versions
|
|
|
|
with:
|
2024-05-29 15:11:53 +00:00
|
|
|
fallbackNode: '^20'
|
|
|
|
fallbackNpm: '^10'
|
2024-01-11 07:56:30 +00:00
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
|
|
- run: npm i -g npm@${{ steps.versions.outputs.npmVersion }}
|
2024-01-16 10:14:52 +00:00
|
|
|
- run: make dist
|
2024-01-11 07:56:30 +00:00
|
|
|
- uses: akkuman/gitea-release-action@v1
|
|
|
|
with:
|
|
|
|
files: |
|
2024-01-15 17:07:37 +00:00
|
|
|
build/artifacts/repod.tar.gz
|
2024-01-16 13:51:06 +00:00
|
|
|
- uses: FKLC/sign-files-action@v1.0.0
|
|
|
|
with:
|
|
|
|
privateKey: ${{ secrets.PRIVATEKEY }}
|
2024-01-16 14:38:46 +00:00
|
|
|
algorithm: RSA-SHA512
|
|
|
|
extension: .sig
|
|
|
|
outputFolder: build/artifacts
|
2024-01-16 13:51:06 +00:00
|
|
|
files: |
|
|
|
|
build/artifacts/repod.tar.gz
|
|
|
|
- id: sign
|
2024-01-16 14:18:37 +00:00
|
|
|
run: echo "SIGNATURE=$(cat build/artifacts/repod.tar.gz.sig | openssl base64 -A)" >> $GITHUB_OUTPUT
|
2024-01-16 13:51:06 +00:00
|
|
|
- uses: actionsflow/axios@v1
|
|
|
|
with:
|
|
|
|
url: https://apps.nextcloud.com/api/v1/apps/releases
|
|
|
|
method: POST
|
|
|
|
accept: 200,201
|
|
|
|
headers: '{ "Authorization": "Token <<<${{ secrets.TOKEN }}>>>" }'
|
|
|
|
data: '{ "download": "https://git.crystalyx.net/Xefir/repod/releases/download/<<<${{ gitea.ref_name }}>>>/repod.tar.gz", "signature": "<<<${{ steps.sign.outputs.SIGNATURE }}>>>" }'
|