|
18 | 18 | type: string
|
19 | 19 | required: true
|
20 | 20 | jobs:
|
| 21 | + # Set default values for inputs or use provided ones |
| 22 | + set-defaults: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + outputs: |
| 25 | + lsp_branch: ${{ steps.set-defaults.outputs.lsp_branch }} |
| 26 | + chat_js_branch: ${{ steps.set-defaults.outputs.chat_js_branch }} |
| 27 | + steps: |
| 28 | + # Check out current repository to read refact_lsp file |
| 29 | + - name: Fetch Sources |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + |
| 34 | + - id: set-defaults |
| 35 | + run: | |
| 36 | + echo "chat_js_branch=${{ github.event.inputs.chat_js_branch || 'main' }}" >> $GITHUB_OUTPUT |
| 37 | + if [ -n "${{ github.event.inputs.lsp_version }}" ]; then |
| 38 | + echo "lsp_version=${{ github.event.inputs.lsp_version }}" >> $GITHUB_OUTPUT |
| 39 | + else |
| 40 | + echo "lsp_version=$(cat refact_lsp)" >> $GITHUB_OUTPUT |
| 41 | + fi |
21 | 42 |
|
22 | 43 | # Run Gradle Wrapper Validation Action to verify the wrapper's checksum
|
23 | 44 | # Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks
|
24 | 45 | # Build plugin and provide the artifact for the next workflow jobs
|
25 | 46 | release:
|
26 | 47 | name: Release
|
| 48 | + needs: set-defaults |
27 | 49 | runs-on: ubuntu-latest
|
28 | 50 | outputs:
|
29 | 51 | version: ${{ steps.properties.outputs.version }}
|
|
75 | 97 | github_token: ${{secrets.GITHUB_TOKEN}}
|
76 | 98 | workflow: agent_gui_build.yml
|
77 | 99 | repo: smallcloudai/refact
|
78 |
| - branch: ${{ inputs.chat_js_branch }} |
| 100 | + branch: ${{ needs.set-defaults.outputs.chat_js_branch }} |
79 | 101 | path: ./chat_package
|
80 | 102 | name: lts-refact-chat-js-.*\.tgz
|
81 | 103 | name_is_regexp: true
|
|
95 | 117 | repo: refact
|
96 | 118 | workflow_file_name: agent_engine_build.yml
|
97 | 119 | github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
98 |
| - ref: ${{ steps.setupvars.outputs.lsp_version }} |
| 120 | + ref: ${{ needs.set-defaults.outputs.lsp_branch }} |
99 | 121 |
|
100 | 122 | - name: Download artifact
|
101 | 123 | id: download-artifact
|
|
0 commit comments