Chore(deps-dev): Bump @nextcloud/eslint-config from 8.3.0-beta.0 to 8.3.0 #222
Workflow file for this run
This file contains 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: Package the app with krankerl | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
release: | |
types: [published] | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set app env | |
run: | | |
# Split and keep last | |
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
with: | |
path: ${{ env.APP_NAME }} | |
- name: Get appinfo data | |
id: appinfo | |
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master | |
with: | |
filename: ${{ env.APP_NAME }}/appinfo/info.xml | |
expression: "//info//dependencies//nextcloud/@min-version" | |
- name: Read package.json node and npm engines version | |
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | |
id: versions | |
# Continue if no package.json | |
continue-on-error: true | |
with: | |
path: ${{ env.APP_NAME }} | |
fallbackNode: "^16" | |
fallbackNpm: "^7" | |
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} | |
# Skip if no package.json | |
if: ${{ steps.versions.outputs.nodeVersion }} | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | |
with: | |
node-version: ${{ steps.versions.outputs.nodeVersion }} | |
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} | |
# Skip if no package.json | |
if: ${{ steps.versions.outputs.npmVersion }} | |
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | |
- name: Set up php ${{ env.PHP_VERSION }} | |
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
coverage: none | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check composer.json | |
id: check_composer | |
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 | |
with: | |
files: "${{ env.APP_NAME }}/composer.json" | |
- name: Install composer dependencies | |
if: steps.check_composer.outputs.files_exists == 'true' | |
run: | | |
cd ${{ env.APP_NAME }} | |
composer install --no-dev | |
- name: Build ${{ env.APP_NAME }} | |
# Skip if no package.json | |
if: ${{ steps.versions.outputs.nodeVersion }} | |
run: | | |
cd ${{ env.APP_NAME }} | |
npm ci | |
npm run build | |
- name: Install Krankerl | |
run: | | |
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb | |
sudo dpkg -i krankerl_0.14.0_amd64.deb | |
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with krankerl | |
run: | | |
cd ${{ env.APP_NAME }} | |
krankerl package | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.APP_NAME }}.tar.gz | |
path: ./${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}.tar.gz |