Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add auto-compile node dist on master branch #39674

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/update-node-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Update Node dist

on:
workflow_dispatch:
push:
branches:
# implemented since 28, once branched off, add you stable branch here
- master
# - stable28

concurrency:
group: update-node-dist-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
update-node-dist:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.1
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^9'

- name: Set up node ${{ 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 }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Setup git
run: |
git config --local user.email "nextcloud-command@users.noreply.github.com"
git config --local user.name "nextcloud-command"

- name: Install dependencies & build
run: |
npm ci
npm run build --if-present

- name: Add and commit
run: |
git add --force dist/
git commit --signoff -m 'chore(assets): recompile assets'
git push origin ${{ github.head_ref }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ core/js/mimetypelist.js
# Tests - cypress
cypress/snapshots
cypress/videos

# Dist folder, to be updated wth --force
/dist
3 changes: 0 additions & 3 deletions dist/1929-1929.js

This file was deleted.

Loading
Loading