|
51 | 51 | continue-on-error: false |
52 | 52 | outputs: |
53 | 53 | commit_context: ${{ steps.extract_context.outputs.context }} |
54 | | - builder_files: ${{ steps.paths.outputs.builder_files }} |
55 | 54 | steps: |
56 | 55 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
57 | 56 | with: |
|
62 | 61 | run: | |
63 | 62 | chown -R $(id -u):$(id -g) $PWD |
64 | 63 |
|
65 | | - - name: Check for builder-related file changes |
66 | | - id: paths |
67 | | - uses: dorny/paths-filter@v3 |
68 | | - with: |
69 | | - filters: | |
70 | | - builder_files: |
71 | | - - .config/mise.toml |
72 | | - - .git/workflows/ci.yaml |
73 | | - - Containerfile |
74 | | - - pyproject.toml |
75 | | - - tools/builder.sh |
76 | | - - uv.lock |
77 | | -
|
78 | 64 | - name: task setup |
79 | 65 | timeout-minutes: 7 # expected under 10s for container builds |
80 | 66 | run: | |
@@ -154,14 +140,27 @@ jobs: |
154 | 140 | - name: task finish |
155 | 141 | run: task finish |
156 | 142 |
|
157 | | - - name: Upload packages archive |
158 | | - uses: ansible/actions/upload-artifact@main |
| 143 | + - name: Upload vsix artifact |
| 144 | + uses: actions/upload-artifact@v7 |
159 | 145 | with: |
160 | | - # Do not use github.ref_name as it contains slashes and we cannot sanitize it |
161 | | - name: ansible-extension-build-${{ github.event.number || github.run_id }}.zip |
162 | | - path: | |
163 | | - out/ansible-*.vsix |
164 | | - out/*.tgz |
| 146 | + path: out/ansible-*.vsix |
| 147 | + archive: false |
| 148 | + if-no-files-found: error |
| 149 | + retention-days: 90 |
| 150 | + |
| 151 | + - name: Upload @ansible-ansible-language-server npm package |
| 152 | + uses: actions/upload-artifact@v7 |
| 153 | + with: |
| 154 | + path: out/@ansible-ansible-language-server-*.tgz |
| 155 | + archive: false |
| 156 | + if-no-files-found: error |
| 157 | + retention-days: 90 |
| 158 | + |
| 159 | + - name: Upload @ansible-ansible-mcp-server npm package |
| 160 | + uses: actions/upload-artifact@v7 |
| 161 | + with: |
| 162 | + path: out/@ansible-ansible-mcp-server-*.tgz |
| 163 | + archive: false |
165 | 164 | if-no-files-found: error |
166 | 165 | retention-days: 90 |
167 | 166 |
|
@@ -445,11 +444,6 @@ jobs: |
445 | 444 | builder-image: |
446 | 445 | runs-on: ubuntu-24.04 |
447 | 446 | needs: [preflight] |
448 | | - if: > |
449 | | - needs.preflight.outputs.builder_files == 'true' || |
450 | | - github.ref_type == 'tag' || |
451 | | - (github.event_name == 'release' && github.event.action == 'published') || |
452 | | - github.event.inputs.publish == 'true' |
453 | 447 | permissions: |
454 | 448 | contents: read |
455 | 449 | packages: write |
@@ -499,7 +493,7 @@ jobs: |
499 | 493 | uses: astral-sh/setup-uv@v7 |
500 | 494 |
|
501 | 495 | - name: Download artifacts |
502 | | - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
| 496 | + uses: actions/download-artifact@v8 |
503 | 497 | with: |
504 | 498 | path: . |
505 | 499 |
|
@@ -581,12 +575,13 @@ jobs: |
581 | 575 | corepack enable |
582 | 576 | npm config set fund false |
583 | 577 |
|
584 | | - - uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 |
| 578 | + - uses: jdx/mise-action@v3 |
585 | 579 |
|
586 | 580 | - name: Download the artifact |
587 | | - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
| 581 | + uses: actions/download-artifact@v8 |
588 | 582 | with: |
589 | | - name: ansible-extension-build-${{ github.event.number || github.run_id }}.zip |
| 583 | + pattern: "ansible-*.vsix" |
| 584 | + skip-decompress: true |
590 | 585 | path: out |
591 | 586 |
|
592 | 587 | - name: Attach vsix to Github release |
@@ -629,14 +624,27 @@ jobs: |
629 | 624 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
630 | 625 |
|
631 | 626 | - name: Download the artifact |
632 | | - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
| 627 | + uses: actions/download-artifact@v8 |
633 | 628 | with: |
634 | | - name: ansible-extension-build-${{ github.event.number || github.run_id }}.zip |
| 629 | + pattern: "@ansible-*.tgz" |
| 630 | + skip-decompress: true |
| 631 | + merge-multiple: true |
635 | 632 | path: out |
636 | 633 |
|
637 | | - - uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 |
| 634 | + - name: Attach npm package to Github release |
| 635 | + # cspell: ignore softprops |
| 636 | + uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 |
| 637 | + if: github.ref_type == 'tag' |
| 638 | + with: |
| 639 | + files: "out/*.tgz" |
638 | 640 |
|
639 | | - - run: npm publish --access public out/@ansible-ansible-language-server-*.tgz |
| 641 | + - uses: jdx/mise-action@v3 |
| 642 | + |
| 643 | + - name: Publish npm packages to npmjs.com |
| 644 | + run: | |
| 645 | + for file in out/@ansible-*.tgz; do |
| 646 | + npm publish --access public "$file" |
| 647 | + done |
640 | 648 | env: |
641 | 649 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
642 | 650 |
|
|
0 commit comments