Skip to content

Commit

Permalink
Merge pull request #557 from martpie/artifact-binaries
Browse files Browse the repository at this point in the history
Binaries  as artifacts
  • Loading branch information
martpie authored Dec 24, 2020
2 parents 543248c + 9aaef05 commit 600657b
Show file tree
Hide file tree
Showing 19 changed files with 6,546 additions and 10,922 deletions.
172 changes: 172 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: build

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
qa:
# Let's implement different jobs for Windows and Linux at some point, especially for packaging scripts
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: 'Test: formatting'
run: 'yarn run test:formatting'

- name: 'Test: TS/JS linting'
run: 'yarn run test:lint'

- name: 'Test: CSS linting'
run: 'yarn run test:css'

- name: Build application
run: yarn run build

- uses: actions/upload-artifact@v2
with:
name: application-build
path: dist/

# Documentation on environments:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners

binaries-linux:
runs-on: ubuntu-18.04
needs: [qa]

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- uses: actions/download-artifact@v2
with:
name: application-build
path: dist/

- name: Install Linux dependencies
run: |
sudo apt update
sudo apt install --no-install-recommends -y libopenjp2-tools rpm gcc-multilib g++-multilib
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Package Linux binaries
# - name: Package Linux/Windows binaries
run: yarn run package:l
# run: yarn run package:lw
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v2
with:
name: binaries-linux
path: |
build/museeks-i386.deb
build/museeks-amd64.deb
build/museeks-i386.AppImage
build/museeks-x86_64.AppImage
build/museeks-i686.rpm
build/museeks-x86_64.rpm
binaries-macos:
runs-on: macos-10.15
needs: [qa]

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- uses: actions/download-artifact@v2
with:
name: application-build
path: dist/

- name: Install production dependencies
run: yarn install --frozen-lockfile

- name: Package macOS binaries
run: yarn run package:m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v2
with:
name: binaries-macos
path: |
build/museeks.dmg
binaries-windows:
runs-on: windows-2019
needs: [qa]

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- uses: actions/download-artifact@v2
with:
name: application-build
path: dist/

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Package Windows binaries
run: yarn run package:w
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v2
with:
name: binaries-windows
path: |
build/museeks-setup.exe
43 changes: 0 additions & 43 deletions .github/workflows/qa.yml

This file was deleted.

19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,22 @@ Requirements:

- `node` > 10
- `npm` > 6
- `yarn` 1

Please consider that **`master` is unstable**.

- `git clone git@github.com:martpie/museeks.git`
- `cd museeks`
- `npm ci`
- `npm run modules:rebuild`
- `npm run build` or `npm run dev`
- `npm run museeks` or `npm run museeks:debug`
- `yarn install --frozen-lockfile`
- `yarn run build` or `yarn run dev`
- `yarn run museeks` or `yarn run museeks:debug`

### Package (advanced)

- `rm -rf node_modules dist build`
- `npm ci`
- `npm run modules:rebuild`
- `npm run build`
- `npm run package:lmw`
- `yarn install --frozen-lockfile`
- `yarn run build`
- `yarn run package:lmw`

## Troubleshooting

Expand All @@ -92,8 +91,8 @@ If you want to report a bug, first, thanks a lot, that helps us a lot. Please op

- Fork and clone
- Master may be unstable, checkout to a tag to have a stable state of the app
- `npm install && npm run dev` then run in a separate terminal `npm run museeks:debug`
- `npm run dev` will watch for file changes using Webpack which will recompile JSX and CSS files.
- `yarn install --frozen-lockfile && yarn run dev` then run in a separate terminal `yarn run museeks:debug`
- `yarn run dev` will watch for file changes using Webpack which will recompile JSX and CSS files.

Please respect a few rules:

Expand Down
Loading

0 comments on commit 600657b

Please sign in to comment.