name: Electron app BETA on: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: # os: [ubuntu-18.04, windows-2016] os: [macOS-10.15, windows-2016, ubuntu-18.04] steps: - name: Context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - uses: actions/checkout@v2 with: fetch-depth: 1 - name: Use Node.js 12.x uses: actions/setup-node@v1 with: node-version: 12.x - name: yarn install run: | yarn install - name: setCurrentVersion run: | yarn setCurrentVersion - name: fillNativeModulesElectron run: | yarn fillNativeModulesElectron - name: fillPackagedPlugins run: | yarn fillPackagedPlugins - name: Install Snapcraft if: matrix.os == 'ubuntu-18.04' uses: samuelmeuli/action-snapcraft@v1 - name: Publish if: matrix.os != 'macOS-10.15' run: | yarn run build:app env: GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }} - name: Publish Mac if: matrix.os == 'macOS-10.15' run: | yarn run build:app:mac env: GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish - name: Save snap login if: matrix.os == 'ubuntu-18.04' run: 'echo "$SNAPCRAFT_LOGIN" > snapcraft.login' shell: bash env: SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}} - name: publishSnap if: matrix.os == 'ubuntu-18.04' run: | snapcraft login --with snapcraft.login snapcraft upload --release=beta app/dist/*.snap - name: Copy artifacts run: | mkdir artifacts cp app/dist/*.deb artifacts/dbgate-beta.deb || true cp app/dist/*x86*.AppImage artifacts/dbgate-beta.AppImage || true cp app/dist/*arm64*.AppImage artifacts/dbgate-beta-arm64.AppImage || true cp app/dist/*armv7l*.AppImage artifacts/dbgate-beta-armv7l.AppImage || true cp app/dist/*win*.exe artifacts/dbgate-beta.exe || true cp app/dist/*win_x64.zip artifacts/dbgate-windows-beta.zip || true cp app/dist/*win_arm64.zip artifacts/dbgate-windows-beta-arm64.zip || true cp app/dist/*-mac.dmg artifacts/dbgate-beta.dmg || true cp app/dist/*-mac_arm64.dmg artifacts/dbgate-beta-arm64.dmg || true mv app/dist/*.exe artifacts/ || true mv app/dist/*.zip artifacts/ || true mv app/dist/*.AppImage artifacts/ || true mv app/dist/*.deb artifacts/ || true mv app/dist/*.snap artifacts/ || true mv app/dist/*.dmg artifacts/ || true - name: Upload artifacts uses: actions/upload-artifact@v1 with: name: ${{ matrix.os }} path: artifacts - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: 'artifacts/**' prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}