mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-02-05 16:46:00 +01:00
5fde4cc07c
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
name: Build and publish app release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
env:
|
|
APP_NAME: news
|
|
|
|
jobs:
|
|
build_and_publish:
|
|
environment: release
|
|
runs-on: ubuntu-latest
|
|
name: "Release: build, sign and upload the app"
|
|
strategy:
|
|
matrix:
|
|
php-versions: ['8.1']
|
|
nextcloud: ['stable27']
|
|
database: ['sqlite']
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip
|
|
coverage: none
|
|
|
|
- name: Set up server non MySQL
|
|
uses: SMillerDev/nextcloud-actions/setup-nextcloud@main
|
|
with:
|
|
cron: false
|
|
version: ${{ matrix.nextcloud }}
|
|
database-type: ${{ matrix.database }}
|
|
|
|
- name: Prime app build
|
|
run: make
|
|
|
|
- name: Configure server with app
|
|
uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main
|
|
with:
|
|
app: ${{ env.APP_NAME }}
|
|
check-code: false
|
|
|
|
- name: Create signed release archive
|
|
run: |
|
|
cd ../server/apps/${{ env.APP_NAME }} && make appstore
|
|
env:
|
|
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
app_public_crt: ${{ secrets.APP_PUBLIC_CRT }}
|
|
|
|
- name: Upload app tarball to release
|
|
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df
|
|
id: attach_to_release
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: ../server/apps/${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}.tar.gz
|
|
asset_name: ${{ env.APP_NAME }}.tar.gz
|
|
tag: ${{ github.ref }}
|
|
overwrite: true
|
|
|
|
- name: Upload app to Nextcloud appstore
|
|
uses: R0Wi/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1
|
|
with:
|
|
app_name: ${{ env.APP_NAME }}
|
|
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
|
|
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
|
|
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
nightly: ${{ github.event.release.prerelease }}
|
|
|
|
- name: Delete crt and key from local storage
|
|
run: rm -f ~/.nextcloud/certificates/*
|