Update README.md #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: bs-getenv pipeline | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [12.x] | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| - name: Setup Node ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Print Yarn cache | |
| id: print-yarn-cache | |
| run: echo "::set-output name=yarn-cache::$(yarn cache dir)" | |
| - name: Restore Yarn cache | |
| id: yarn-cache | |
| uses: actions/cache@v1 | |
| with: | |
| path: ${{ steps.print-yarn-cache.outputs.yarn-cache }} | |
| key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install Yarn deps | |
| run: | | |
| yarn install | |
| - name: Install Esy | |
| run: | | |
| npm install -g esy@0.6.2 | |
| - name: Install Esy deps | |
| run: | | |
| esy install | |
| - name: Print Esy cache | |
| id: print-esy-cache | |
| run: node .github/workflows/scripts/print-esy-cache.js | |
| - name: Restore Esy cache | |
| id: esy-cache | |
| uses: actions/cache@v1 | |
| with: | |
| path: ${{ steps.print-esy-cache.outputs.esy-cache }} | |
| key: ${{ matrix.os }}-esy-${{ hashFiles('**/index.json') }} | |
| - name: Build ppx | |
| run: | | |
| esy build | |
| - name: Test | |
| run: | | |
| yarn build | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v1 | |
| with: | |
| name: ${{ matrix.os }} | |
| path: _build/default/bin/bin.exe | |
| rc: | |
| needs: build | |
| name: Prepare RC | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| - name: Setup Node ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 12.x | |
| - name: Download Linux artifacts | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: ubuntu-latest | |
| path: _bin/linux | |
| - name: Download macOS artifacts | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: macOS-latest | |
| path: _bin/darwin | |
| - name: Download Windows artifacts | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: windows-latest | |
| path: _bin/windows | |
| - name: Move artifacts | |
| run: | | |
| mkdir -p _release/bin | |
| mv _bin/darwin/bin.exe _release/bin/bs-getenv-ppx-darwin-x64.exe | |
| mv _bin/windows/bin.exe _release/bin/bs-getenv-ppx-win-x64.exe | |
| mv _bin/linux/bin.exe _release/bin/bs-getenv-ppx-linux-x64.exe | |
| rm -rf _bin | |
| - name: Move files | |
| run: | | |
| mkdir -p _release/src | |
| cp README.md _release/README.md | |
| cp bsconfig.json _release/bsconfig.json | |
| cp .github/workflows/scripts/copy-binaries.js _release/postinstall.js | |
| node .github/workflows/scripts/write-package-json.js | |
| - name: Upload release | |
| uses: actions/upload-artifact@v1 | |
| with: | |
| name: release | |
| path: _release |