|
| 1 | +name: Node CI |
| 2 | +on: [push, pull_request] |
| 3 | +jobs: |
| 4 | + ci_macos: |
| 5 | + runs-on: macos-latest |
| 6 | + strategy: |
| 7 | + matrix: |
| 8 | + node-version: [12.x] |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v1 |
| 11 | + - name: Use Node.js ${{ matrix.node-version }} |
| 12 | + uses: actions/setup-node@v1 |
| 13 | + with: |
| 14 | + node-version: ${{ matrix.node-version }} |
| 15 | + - name: Install |
| 16 | + run: yarn install |
| 17 | + - name: Test |
| 18 | + run: yarn run test |
| 19 | + - name: Build |
| 20 | + run: yarn run dist --publish=never |
| 21 | + env: |
| 22 | + CI: true |
| 23 | + - name: Get macOS Artifact Names |
| 24 | + id: getmacosfilename |
| 25 | + run: | |
| 26 | + echo "::set-output name=dmgName::$(ls dist/*.dmg | cut -d'/' -f2)" |
| 27 | + echo "::set-output name=dmgPath::$(ls dist/*.dmg)" |
| 28 | + - name: Archive macOS Build Artifacts |
| 29 | + uses: actions/upload-artifact@v1 |
| 30 | + with: |
| 31 | + name: ${{ steps.getmacosfilename.outputs.dmgName }} |
| 32 | + path: ${{ steps.getmacosfilename.outputs.dmgPath }} |
| 33 | + ci_linux: |
| 34 | + runs-on: ubuntu-latest |
| 35 | + strategy: |
| 36 | + matrix: |
| 37 | + node-version: [12.x] |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v1 |
| 40 | + - name: Use Node.js ${{ matrix.node-version }} |
| 41 | + uses: actions/setup-node@v1 |
| 42 | + with: |
| 43 | + node-version: ${{ matrix.node-version }} |
| 44 | + - name: Install |
| 45 | + run: yarn install |
| 46 | + - name: Test |
| 47 | + run: yarn run test |
| 48 | + - name: Build |
| 49 | + run: yarn run dist --publish=never |
| 50 | + env: |
| 51 | + CI: true |
| 52 | + - name: Get Linux Artifact Names |
| 53 | + id: getlinuxfilename |
| 54 | + run: | |
| 55 | + echo "::set-output name=snapName::$(ls dist/*.snap | cut -d'/' -f2)" |
| 56 | + echo "::set-output name=snapPath::$(ls dist/*.snap)" |
| 57 | + echo "::set-output name=AppImageName::$(ls dist/*.AppImage | cut -d'/' -f2)" |
| 58 | + echo "::set-output name=AppImagePath::$(ls dist/*.AppImage)" |
| 59 | + echo "::set-output name=debName::$(ls dist/*.deb | cut -d'/' -f2)" |
| 60 | + echo "::set-output name=debPath::$(ls dist/*.deb)" |
| 61 | + echo "::set-output name=rpmName::$(ls dist/*.rpm | cut -d'/' -f2)" |
| 62 | + echo "::set-output name=rpmPath::$(ls dist/*.rpm)" |
| 63 | + - name: Archive Linux Build Artifacts (Snap) |
| 64 | + uses: actions/upload-artifact@v1 |
| 65 | + with: |
| 66 | + name: ${{ steps.getlinuxfilename.outputs.snapName }} |
| 67 | + path: ${{ steps.getlinuxfilename.outputs.snapPath }} |
| 68 | + - name: Archive Linux Build Artifacts (AppImage) |
| 69 | + uses: actions/upload-artifact@v1 |
| 70 | + with: |
| 71 | + name: ${{ steps.getlinuxfilename.outputs.AppImageName }} |
| 72 | + path: ${{ steps.getlinuxfilename.outputs.AppImagePath }} |
| 73 | + - name: Archive Linux Build Artifacts (Deb) |
| 74 | + uses: actions/upload-artifact@v1 |
| 75 | + with: |
| 76 | + name: ${{ steps.getlinuxfilename.outputs.debName }} |
| 77 | + path: ${{ steps.getlinuxfilename.outputs.debPath }} |
| 78 | + - name: Archive Linux Build Artifacts (RPM) |
| 79 | + uses: actions/upload-artifact@v1 |
| 80 | + with: |
| 81 | + name: ${{ steps.getlinuxfilename.outputs.rpmName }} |
| 82 | + path: ${{ steps.getlinuxfilename.outputs.rpmPath }} |
| 83 | + ci_windows: |
| 84 | + runs-on: windows-latest |
| 85 | + strategy: |
| 86 | + matrix: |
| 87 | + node-version: [12.x] |
| 88 | + steps: |
| 89 | + - uses: actions/checkout@v1 |
| 90 | + - name: Use Node.js ${{ matrix.node-version }} |
| 91 | + uses: actions/setup-node@v1 |
| 92 | + with: |
| 93 | + node-version: ${{ matrix.node-version }} |
| 94 | + - name: Install |
| 95 | + run: yarn install |
| 96 | + - name: Test |
| 97 | + run: yarn run test |
| 98 | + - name: Build |
| 99 | + run: yarn run dist --publish=never |
| 100 | + env: |
| 101 | + CI: true |
| 102 | + - name: Get Windows Artifact Names |
| 103 | + id: getwindowsfilename |
| 104 | + run: | |
| 105 | + Write-Host "::set-output name=exeName::$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String exe)" |
| 106 | + Write-Host "::set-output name=exePath::dist/squirrel-windows/$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String exe)" |
| 107 | + Write-Host "::set-output name=nupkgName::$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String nupkg)" |
| 108 | + Write-Host "::set-output name=nupkgPath::dist/squirrel-windows/$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String nupkg)" |
| 109 | + - name: Archive Windows Build Artifacts (exe) |
| 110 | + uses: actions/upload-artifact@v1 |
| 111 | + with: |
| 112 | + name: ${{ steps.getwindowsfilename.outputs.exeName }} |
| 113 | + path: ${{ steps.getwindowsfilename.outputs.exePath }} |
| 114 | + - name: Archive Windows Build Artifacts (nupkg) |
| 115 | + uses: actions/upload-artifact@v1 |
| 116 | + with: |
| 117 | + name: ${{ steps.getwindowsfilename.outputs.nupkgName }} |
| 118 | + path: ${{ steps.getwindowsfilename.outputs.nupkgPath }} |
0 commit comments