Improved path ignores
This commit is contained in:
@@ -1,100 +1,102 @@
|
||||
name: Build Android
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "**/README.md"
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "**/*.md"
|
||||
- "fastline/**"
|
||||
- "materialious/src/i18n/locales/**"
|
||||
|
||||
workflow_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
android-build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./materialious/android
|
||||
android-build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./materialious/android
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: latest
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Install modules
|
||||
run: cd ../ && npm install
|
||||
- name: Install modules
|
||||
run: cd ../ && npm install
|
||||
|
||||
- name: Build android nodejs packages
|
||||
run: cd ../static/nodejs-android && npm install
|
||||
- name: Build android nodejs packages
|
||||
run: cd ../static/nodejs-android && npm install
|
||||
|
||||
- name: Build package
|
||||
run: cd ../ && npm run build
|
||||
- name: Build package
|
||||
run: cd ../ && npm run build
|
||||
|
||||
- name: Sync package
|
||||
run: cd ../ && npx cap sync
|
||||
- name: Sync package
|
||||
run: cd ../ && npx cap sync
|
||||
|
||||
- name: Setup JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: "17"
|
||||
cache: "gradle"
|
||||
- name: Setup JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: "17"
|
||||
cache: "gradle"
|
||||
|
||||
- name: Build App
|
||||
run: |
|
||||
bash gradlew assembleRelease
|
||||
bash gradlew bundleRelease
|
||||
- name: Build App
|
||||
run: |
|
||||
bash gradlew assembleRelease
|
||||
bash gradlew bundleRelease
|
||||
|
||||
- name: Move files
|
||||
run: |
|
||||
mv app/build/outputs/apk/release/*.apk app/build/outputs/
|
||||
mv app/build/outputs/bundle/release/*.aab app/build/outputs/
|
||||
- name: Move files
|
||||
run: |
|
||||
mv app/build/outputs/apk/release/*.apk app/build/outputs/
|
||||
mv app/build/outputs/bundle/release/*.aab app/build/outputs/
|
||||
|
||||
- name: Sign App
|
||||
id: sign_app
|
||||
uses: ilharp/sign-android-release@v1.0.4
|
||||
with:
|
||||
releaseDir: ./materialious/android/app/build/outputs/
|
||||
signingKey: ${{ secrets.ANDROID_SIGNING_KEY }}
|
||||
keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
buildToolsVersion: 35.0.0
|
||||
- name: Sign App
|
||||
id: sign_app
|
||||
uses: ilharp/sign-android-release@v1.0.4
|
||||
with:
|
||||
releaseDir: ./materialious/android/app/build/outputs/
|
||||
signingKey: ${{ secrets.ANDROID_SIGNING_KEY }}
|
||||
keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
buildToolsVersion: 35.0.0
|
||||
|
||||
- name: Make release dir
|
||||
run: mkdir app/release
|
||||
- name: Make release dir
|
||||
run: mkdir app/release
|
||||
|
||||
- name: Delete temp apks
|
||||
run: rm app/build/outputs/*temp*
|
||||
continue-on-error: true
|
||||
- name: Delete temp apks
|
||||
run: rm app/build/outputs/*temp*
|
||||
continue-on-error: true
|
||||
|
||||
- name: Move files to release
|
||||
run: |
|
||||
mv app/build/outputs/*-signed.aab app/release/
|
||||
mv app/build/outputs/*-signed.apk app/release/
|
||||
continue-on-error: true
|
||||
- name: Move files to release
|
||||
run: |
|
||||
mv app/build/outputs/*-signed.aab app/release/
|
||||
mv app/build/outputs/*-signed.apk app/release/
|
||||
continue-on-error: true
|
||||
|
||||
- name: Remove unsigned from file name
|
||||
run: cd app/release/ && for file in *-unsigned*; do mv "$file" "${file//-unsigned/}"; done
|
||||
continue-on-error: true
|
||||
- name: Remove unsigned from file name
|
||||
run: cd app/release/ && for file in *-unsigned*; do mv "$file" "${file//-unsigned/}"; done
|
||||
continue-on-error: true
|
||||
|
||||
- name: get-npm-version
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||
with:
|
||||
path: ./materialious
|
||||
- name: get-npm-version
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||
with:
|
||||
path: ./materialious
|
||||
|
||||
- name: Upload APKs to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./materialious/android/app/release/*
|
||||
tag: ${{ steps.package-version.outputs.current-version }}
|
||||
release_name: ${{ steps.package-version.outputs.current-version }}
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
draft: false
|
||||
- name: Upload APKs to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ./materialious/android/app/release/*
|
||||
tag: ${{ steps.package-version.outputs.current-version }}
|
||||
release_name: ${{ steps.package-version.outputs.current-version }}
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
draft: false
|
||||
|
||||
@@ -1,80 +1,82 @@
|
||||
name: Build desktop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "**/README.md"
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "**/*.md"
|
||||
- "fastline/**"
|
||||
- "materialious/src/i18n/locales/**"
|
||||
|
||||
workflow_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
desktop-build:
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [latest]
|
||||
runtime:
|
||||
- linux-x64
|
||||
- linux-arm64
|
||||
- win-x64
|
||||
- osx-x64
|
||||
desktop-build:
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [latest]
|
||||
runtime:
|
||||
- linux-x64
|
||||
- linux-arm64
|
||||
- win-x64
|
||||
- osx-x64
|
||||
|
||||
include:
|
||||
- runtime: linux-x64
|
||||
os: ubuntu-latest
|
||||
- runtime: linux-arm64
|
||||
os: ubuntu-latest
|
||||
- runtime: osx-x64
|
||||
os: macOS-latest
|
||||
- runtime: win-x64
|
||||
os: windows-latest
|
||||
include:
|
||||
- runtime: linux-x64
|
||||
os: ubuntu-latest
|
||||
- runtime: linux-arm64
|
||||
os: ubuntu-latest
|
||||
- runtime: osx-x64
|
||||
os: macOS-latest
|
||||
- runtime: win-x64
|
||||
os: windows-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install modules
|
||||
run: cd ./materialious && npm install
|
||||
- name: Install modules
|
||||
run: cd ./materialious && npm install
|
||||
|
||||
- name: Build package
|
||||
run: cd ./materialious && npm run build
|
||||
- name: Build package
|
||||
run: cd ./materialious && npm run build
|
||||
|
||||
- name: Sync electron package
|
||||
run: cd ./materialious && npx cap sync @capacitor-community/electron
|
||||
- name: Sync electron package
|
||||
run: cd ./materialious && npx cap sync @capacitor-community/electron
|
||||
|
||||
- name: Patch capacitor plugin
|
||||
run: cd ./materialious/electron && python patch_capacitor_plugin.py
|
||||
- name: Patch capacitor plugin
|
||||
run: cd ./materialious/electron && python patch_capacitor_plugin.py
|
||||
|
||||
- name: Install electron modules
|
||||
run: cd ./materialious/electron && npm install
|
||||
- name: Install electron modules
|
||||
run: cd ./materialious/electron && npm install
|
||||
|
||||
- name: Set up environment variables
|
||||
run: echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: runner.os != 'Windows'
|
||||
- name: Set up environment variables
|
||||
run: echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: runner.os != 'Windows'
|
||||
|
||||
- name: Set up environment variables
|
||||
run: echo GH_TOKEN=${{ secrets.GITHUB_TOKEN }} >> $env:GITHUB_ENV
|
||||
shell: powershell
|
||||
if: runner.os == 'Windows'
|
||||
- name: Set up environment variables
|
||||
run: echo GH_TOKEN=${{ secrets.GITHUB_TOKEN }} >> $env:GITHUB_ENV
|
||||
shell: powershell
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
- name: Install snapcraft
|
||||
if: matrix.runtime == 'linux-x64' || matrix.runtime == 'linux-arm64'
|
||||
run: sudo snap install snapcraft --classic
|
||||
- name: Install snapcraft
|
||||
if: matrix.runtime == 'linux-x64' || matrix.runtime == 'linux-arm64'
|
||||
run: sudo snap install snapcraft --classic
|
||||
|
||||
- name: Set up snapcraft environment variables
|
||||
run: echo "SNAPCRAFT_STORE_CREDENTIALS=${{ secrets.SNAPCRAFT_LOGIN }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: matrix.runtime == 'linux-x64' || matrix.runtime == 'linux-arm64'
|
||||
- name: Set up snapcraft environment variables
|
||||
run: echo "SNAPCRAFT_STORE_CREDENTIALS=${{ secrets.SNAPCRAFT_LOGIN }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: matrix.runtime == 'linux-x64' || matrix.runtime == 'linux-arm64'
|
||||
|
||||
- name: Build desktop packages
|
||||
run: cd ./materialious/electron && npm run electron:make
|
||||
- name: Build desktop packages
|
||||
run: cd ./materialious/electron && npm run electron:make
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
name: Build web
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**/README.md'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "**/*.md"
|
||||
- "fastline/**"
|
||||
- "materialious/src/i18n/locales/**"
|
||||
|
||||
jobs:
|
||||
web-build:
|
||||
runs-on: ubuntu-latest
|
||||
web-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Extract version from package.json
|
||||
id: extract_version
|
||||
run: |
|
||||
VERSION=$(jq -r .version ./materialious/package.json)
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./materialious
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
wardpearce/materialious:latest
|
||||
wardpearce/materialious:${{ steps.extract_version.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Extract version from package.json
|
||||
id: extract_version
|
||||
run: |
|
||||
VERSION=$(jq -r .version ./materialious/package.json)
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./materialious
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
wardpearce/materialious:latest
|
||||
wardpearce/materialious:${{ steps.extract_version.outputs.version }}
|
||||
|
||||
Reference in New Issue
Block a user