|
| 1 | +name: Create snapshot release |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - develop |
| 6 | + |
| 7 | +jobs: |
| 8 | + test: |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [ ubuntu-latest, windows-latest, macos-latest ] |
| 12 | + runs-on: ${{matrix.os}} |
| 13 | + steps: |
| 14 | + - name: Set up Git repository |
| 15 | + uses: actions/checkout@v2 |
| 16 | + - name: Set up node |
| 17 | + uses: actions/setup-node@v2 |
| 18 | + with: |
| 19 | + node-version: ${{matrix.node}} |
| 20 | + - name: Configure Linux environment |
| 21 | + if: ${{matrix.os == 'ubuntu-latest'}} |
| 22 | + run: | |
| 23 | + sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev g++-4.8 gcc-4.8 |
| 24 | + export CXX=g++-4.8 && $CXX --version |
| 25 | + - name: Install |
| 26 | + run: npm run patch && npm i |
| 27 | + - name: Build |
| 28 | + run: npm run build:release |
| 29 | + - name: Run tests |
| 30 | + uses: GabrielBB/xvfb-action@v1 |
| 31 | + with: |
| 32 | + working-directory: ./test/ |
| 33 | + run: npm cit |
| 34 | + - name: Run window tests |
| 35 | + uses: GabrielBB/xvfb-action@v1 |
| 36 | + with: |
| 37 | + working-directory: ./test/window-integration-tests |
| 38 | + run: npm cit |
| 39 | + |
| 40 | + deploy: |
| 41 | + needs: |
| 42 | + - test |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + os: [ ubuntu-latest, windows-latest, macos-latest ] |
| 46 | + runs-on: ${{matrix.os}} |
| 47 | + steps: |
| 48 | + - name: Set up Git repository |
| 49 | + uses: actions/checkout@v2 |
| 50 | + - name: Set up node |
| 51 | + uses: actions/setup-node@v2 |
| 52 | + with: |
| 53 | + node-version: 14 |
| 54 | + - name: Configure Linux environment |
| 55 | + if: ${{matrix.os == 'ubuntu-latest'}} |
| 56 | + run: | |
| 57 | + sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev g++-4.8 gcc-4.8 |
| 58 | + export CXX=g++-4.8 && $CXX --version |
| 59 | + - name: Install |
| 60 | + run: npm run patch && npm i |
| 61 | + - name: Publish snapshot release |
| 62 | + if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}} |
| 63 | + run: ./.build/pre-release.sh |
| 64 | + shell: bash |
| 65 | + env: |
| 66 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 67 | + - name: Publish Windows snapshot release |
| 68 | + if: ${{matrix.os == 'windows-latest'}} |
| 69 | + run: ./.build/pre-release.ps1 |
| 70 | + shell: powershell |
| 71 | + env: |
| 72 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments