Ensure npm build fix #215
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: "dev Build" | |
on: | |
push: | |
branches: | |
- "dev" | |
jobs: | |
Build: | |
strategy: | |
matrix: | |
runs-on: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install dependencies" | |
run: npm install | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Build | |
run: npm run build-${{ matrix.runs-on }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./build/* | |
Release: | |
needs: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: my-artifact | |
pattern: my-artifact-* | |
merge-multiple: true | |
- name: Publish dev build on GitHub | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "dev" | |
prerelease: true | |
title: "Latest" | |
files: build/* | |
DockerHub: | |
name: "dev Build - DockerHub" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build & Publish dev on DockerHub | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: inrix/floatplane-downloader:dev | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |