diff --git a/.github/workflows/precompile.yml b/.github/workflows/precompile.yml deleted file mode 100644 index dad7a60b0..000000000 --- a/.github/workflows/precompile.yml +++ /dev/null @@ -1,61 +0,0 @@ -on: - release: - types: [created] -jobs: - precompile: - if: contains(github.event.release.tag_name, 'v0.0.0-latest-master') == false - strategy: - matrix: - include: - - os: ubuntu-18.04 - platform: linux - arch: x64 - - os: windows-latest - platfrom: win32 - arch: x64 - - os: macos-latest - platform: darwin - arch: x64 - runs-on: ${{ matrix.os }} - env: - ARCHIVE_FILENAME: ${{github.event.release.tag_name}}-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 - with: - node-version: '16.x' - - - name: Install ubuntu deps - if: contains(matrix.os, 'ubuntu-18.04') - run: sudo apt install mesa-common-dev libglu1-mesa-dev - - - name: Install deps - run: npm install - - - name: Build nodegui - run: npm run build - env: - CMAKE_BUILD_PARALLEL_LEVEL: 8 - - - name: Compress files - uses: a7ul/tar-action@v1.0.2 - id: compress - with: - command: c - cwd: ./build/Release - files: | - ./nodegui_core.node - outPath: ${{ ARCHIVE_FILENAME }} - - - uses: actions/upload-artifact@v1 - with: - name: ${{ ARCHIVE_FILENAME }} - path: ${{ ARCHIVE_FILENAME }} - - - name: Upload release binaries - uses: alexellis/upload-assets@0.2.2 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - asset_paths: '["${{ ARCHIVE_FILENAME }}"]' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bca5a3941..fa1e50ceb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,66 @@ on: types: [published] jobs: + precompile: + if: contains(github.event.release.tag_name, 'v0.0.0-latest-master') == false + strategy: + matrix: + include: + - os: ubuntu-18.04 + platform: linux + arch: x64 + - os: windows-latest + platfrom: win32 + arch: x64 + - os: macos-latest + platform: darwin + arch: x64 + runs-on: ${{ matrix.os }} + env: + ARCHIVE_FILENAME: ${{github.event.release.tag_name}}-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: '16.x' + + - name: Install ubuntu deps + if: contains(matrix.os, 'ubuntu-18.04') + run: sudo apt install mesa-common-dev libglu1-mesa-dev + + - name: Install deps + run: npm install + + - name: Build nodegui + run: npm run build + env: + CMAKE_BUILD_PARALLEL_LEVEL: 8 + + - name: Compress files + uses: a7ul/tar-action@v1.0.2 + id: compress + with: + command: c + cwd: ./build/Release + files: | + ./nodegui_core.node + outPath: ${{ ARCHIVE_FILENAME }} + + - uses: actions/upload-artifact@v1 + with: + name: ${{ ARCHIVE_FILENAME }} + path: ${{ ARCHIVE_FILENAME }} + + - name: Upload release binaries + uses: alexellis/upload-assets@0.2.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + asset_paths: '["${{ ARCHIVE_FILENAME }}"]' + publish-npm-package: + needs: precompile if: contains(github.event.release.tag_name, 'v0.0.0-latest-master') == false runs-on: ubuntu-latest steps: