|
1 | | -name: Build Dry Run |
| 1 | +name: Build Dry Run π |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
5 | 5 |
|
6 | 6 | jobs: |
7 | | - build: |
| 7 | + build-matrix: |
8 | 8 | runs-on: ${{ matrix.os }} |
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | 11 | os: [windows-latest, macos-latest, ubuntu-latest] |
12 | 12 | steps: |
13 | | - - uses: actions/checkout@v2 |
14 | | - - name: Build project |
15 | | - run: | |
16 | | - yarn |
17 | | - - uses: actions/upload-artifact@v2 |
18 | | - with: |
19 | | - name: build-artifact-${{ matrix.os }} |
20 | | - path: | |
21 | | - ${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' || |
22 | | - matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' || |
23 | | - '' }} |
| 13 | + - name: Checkout Repository π₯ |
| 14 | + uses: actions/checkout@v4 |
| 15 | + |
| 16 | + - name: Setup Node.js π |
| 17 | + uses: actions/setup-node@v4 |
| 18 | + with: |
| 19 | + node-version: '20.x' |
| 20 | + cache: 'yarn' |
| 21 | + |
| 22 | + - name: Install Dependencies π§Ά |
| 23 | + run: | |
| 24 | + yarn |
| 25 | +
|
| 26 | + - name: Save Artifacts π |
| 27 | + uses: actions/upload-artifact@v4 |
| 28 | + with: |
| 29 | + name: build-artifact-${{ matrix.os }} |
| 30 | + path: | |
| 31 | + ${{ matrix.os == 'macos-latest' && './libpg_query/osx/libpg_query.a' || |
| 32 | + matrix.os == 'ubuntu-latest' && './libpg_query/linux/libpg_query.a' || |
| 33 | + matrix.os == 'windows-latest' && './libpg_query/windows/queryparser.lib' }} |
| 34 | +
|
24 | 35 | prepare-and-publish: |
25 | | - needs: build |
| 36 | + needs: build-matrix # Corrected the needs to reflect the actual job name |
26 | 37 | runs-on: ubuntu-latest |
27 | 38 | steps: |
28 | | - - uses: actions/checkout@v2 |
29 | | - - uses: actions/download-artifact@v2 |
30 | | - with: |
31 | | - path: downloaded-artifacts |
32 | | - - name: Prepare artifacts |
33 | | - run: | |
34 | | - # move or prepare artifacts |
35 | | - ls downloaded-artifacts/* |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + - uses: actions/download-artifact@v4 |
| 41 | + with: |
| 42 | + path: downloaded-artifacts |
| 43 | + - name: Prepare artifacts |
| 44 | + run: | |
| 45 | + # move or prepare artifacts |
| 46 | + find . |
36 | 47 | # - name: Publish to NPM |
37 | 48 | # run: | |
38 | 49 | # # Assuming you've set up your package.json and .npmrc correctly |
39 | 50 | # npm publish |
40 | 51 | # env: |
41 | | - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
|
0 commit comments