Skip to content

Commit

Permalink
WIP: github config
Browse files Browse the repository at this point in the history
  • Loading branch information
sauravhiremath committed Apr 29, 2020
1 parent 4f8481f commit 7a561d7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 80 deletions.
76 changes: 10 additions & 66 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,23 @@ name: Continuous integration

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
node:
- stable
- lts
fail-fast: false
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Upload Artifact (Linux/MacOS)
uses: actions/upload-artifact@v1
if: matrix.os != 'windows-latest'
- name: Setup nodejs
uses: actions/setup-node@v1
with:
name: juno-${{matrix.os}}
path: target/release/juno
node-version: '12.x'

- name: Install dependencies
run: npm ci

- name: Upload Artifact (Windows)
uses: actions/upload-artifact@v1
if: matrix.os == 'windows-latest'
- name: Publish to npm
uses: actions/setup-node@v1
with:
name: juno-${{matrix.os}}
path: target/release/juno.exe
command: npm publish

# Publish release on push to master
release-master:
Expand All @@ -51,30 +43,6 @@ jobs:
tagFormat: v${version}
id: version_check

- name: Download Windows Artifact
uses: actions/download-artifact@v1
with:
name: juno-windows-latest
path: release/windows

- name: Download MacOS Artifact
uses: actions/download-artifact@v1
with:
name: juno-macos-latest
path: release/macos

- name: Download Linux Artifact
uses: actions/download-artifact@v1
with:
name: juno-ubuntu-latest
path: release/linux

- name: Rename Artifacts
run: |
mv release/windows/juno.exe release/windows/juno-${{steps.version_check.outputs.releaseVersion}}-windows.exe
mv release/macos/juno release/macos/juno-${{steps.version_check.outputs.releaseVersion}}-macos
mv release/linux/juno release/linux/juno-${{steps.version_check.outputs.releaseVersion}}-linux
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -100,30 +68,6 @@ jobs:
tagFormat: v${version}-beta
id: version_check

- name: Download Windows Artifact
uses: actions/download-artifact@v1
with:
name: juno-windows-latest
path: release/windows

- name: Download MacOS Artifact
uses: actions/download-artifact@v1
with:
name: juno-macos-latest
path: release/macos

- name: Download Linux Artifact
uses: actions/download-artifact@v1
with:
name: juno-ubuntu-latest
path: release/linux

- name: Rename Artifacts
run: |
mv release/windows/juno.exe release/windows/juno-${{steps.version_check.outputs.releaseVersion}}-windows.exe
mv release/macos/juno release/macos/juno-${{steps.version_check.outputs.releaseVersion}}-macos
mv release/linux/juno release/linux/juno-${{steps.version_check.outputs.releaseVersion}}-linux
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
branches:
- master
- staging
- develop
- develop

name: Continuous integration (PR)

Expand All @@ -13,7 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- run: git fetch --all --tags

- name: Check Release Version (staging)
Expand All @@ -32,23 +31,20 @@ jobs:
tagFormat: v${version}
id: version_check_master
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
node:
- stable
- lts
fail-fast: false
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
uses: actions-rs/cargo@v1
- name: Setup nodejs
uses: actions/setup-node@v1
with:
command: npm ci
node-version: '12.x'

- name: Install dependencies
run: npm ci

- name: Publish to npm
uses: actions-rs/cargo@v1
uses: actions/setup-node@v1
with:
command: npm publish

0 comments on commit 7a561d7

Please sign in to comment.