Bump next from 13.5.6 to 14.0.3 #2140
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: Build/release | |
on: | |
push: | |
branches: | |
- main-v2 | |
- feature/* | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main-v2 | |
# env: | |
# DEBUG: '*' | |
jobs: | |
lint: | |
name: Lint code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: 18 | |
- name: Set up node_modules cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
node_modules/ | |
xal-node/node_modules/ | |
key: ${{ runner.os }}-${{ runner.arch }}-npm-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-npm- | |
- name: Install yarn dependencies | |
run: yarn | |
- name: Lint code | |
run: yarn lint | |
cachedeps: | |
name: Generate cached sources | |
runs-on: ubuntu-latest | |
needs: ['lint'] | |
steps: | |
# Intsall node tools | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'flatpak/flatpak-builder-tools' | |
- name: Install Python deps | |
run: pip3 install aiohttp toml | |
- name: Install flatpak-builder-tools | |
run: pipx install ./node/ | |
- name: Copy cargo script | |
run: cp cargo/flatpak-cargo-generator.py ../flatpak-cargo-generator.py | |
# Generate sources | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# clean: true | |
- name: Prep artifacts dir | |
run: mkdir ./deps-dist/ | |
- name: Build yarn cache | |
run: flatpak-node-generator yarn yarn.lock -o ./deps-dist/yarn-sources.json | |
- name: Build npm cache | |
run: flatpak-node-generator npm xal-node/package-lock.json -o ./deps-dist/npm-sources.json | |
- name: Build cargo cache | |
run: python3 ../flatpak-cargo-generator.py xal-node/Cargo.lock -o ./deps-dist/cargo-sources.json | |
- uses: actions/upload-artifact@master | |
with: | |
name: flatpak-sources | |
path: ./deps-dist/ | |
flatpak: | |
name: Flatpak Build | |
runs-on: ubuntu-latest | |
needs: [cachedeps] | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:gnome-44 | |
options: --privileged | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/download-artifact@master | |
with: | |
name: flatpak-sources | |
path: flatpak/ | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: 18 | |
- name: Set up flatpak build cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
build/ | |
.flatpak-builder/ | |
key: ${{ runner.os }}-${{ runner.arch }}-flatpak-builder-${{ hashFiles('flatpak/*') }} | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-flatpak-builder- | |
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | |
with: | |
bundle: greenlight.flatpak | |
manifest-path: flatpak/dev.unknownskl.greenlight.yml | |
cache-key: flatpak-builder-${{ github.sha }} | |
release: | |
runs-on: ${{ matrix.os }} | |
needs: ['lint'] | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: 18 | |
- run: rustup target add aarch64-apple-darwin | |
if: matrix.os == 'macos-latest' | |
- run: New-Item -Name downloads -Path $env:VCPKG_INSTALLATION_ROOT -ItemType Directory | |
if: runner.os == 'Windows' | |
- run: New-Item -Name archives -Path $env:VCPKG_INSTALLATION_ROOT -ItemType Directory | |
if: runner.os == 'Windows' | |
- run: Invoke-WebRequest -Uri https://fossies.org/windows/misc/nasm-2.16.01-win64.zip -OutFile $env:VCPKG_INSTALLATION_ROOT\downloads\nasm-2.16.01-win64.zip | |
if: runner.os == 'Windows' | |
- run: cd $env:VCPKG_INSTALLATION_ROOT && dir && dir $env:VCPKG_INSTALLATION_ROOT | |
if: runner.os == 'Windows' | |
- name: Set up vcpkg cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
$env:VCPKG_INSTALLATION_ROOT\downloads\ | |
$env:VCPKG_INSTALLATION_ROOT\archives\ | |
key: ${{ runner.os }}-${{ runner.arch }}-vcpkg | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-vcpkg- | |
if: runner.os == 'Windows' | |
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append | |
if: runner.os == 'Windows' | |
- run: vcpkg install openssl:x64-windows-static-md | |
if: runner.os == 'Windows' | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
xal-node/target/ | |
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-cargo- | |
- name: Set up node_modules cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
node_modules/ | |
xal-node/node_modules/ | |
key: ${{ runner.os }}-${{ runner.arch }}-npm-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-${{ runner.arch }}-npm- | |
- name: Install yarn dependencies | |
run: yarn | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1.6.0 | |
with: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
github_token: ${{ secrets.github_token }} | |
# If the commit is tagged with a version (e.g. "v1.0.0"), | |
# release the app after building | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
# if: startsWith(github.ref, 'refs/tags/v') | |
- name: Publish Linux AppImage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-linux.AppImage | |
path: | | |
dist/*.AppImage | |
if: matrix.os == 'ubuntu-latest' && contains(github.event.head_commit.message, '[build]') | |
- name: Publish Linux DEB | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-linux.deb | |
path: | | |
dist/*.deb | |
if: matrix.os == 'ubuntu-latest' && contains(github.event.head_commit.message, '[build]') | |
- name: Publish Mac DMG | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-macos.dmg | |
path: | | |
dist/*.dmg | |
if: matrix.os == 'macos-latest' && contains(github.event.head_commit.message, '[build]') | |
- name: Publish Windows EXE | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenlight-win.zip | |
path: | | |
dist/*.exe | |
if: matrix.os == 'windows-latest' && contains(github.event.head_commit.message, '[build]') |