|
15 | 15 | type: boolean |
16 | 16 |
|
17 | 17 | env: |
18 | | - RUNNER_DEV_VERSION: "0.9.x" |
| 18 | + RUNNER_DEV_VERSION: "0.11.x" |
19 | 19 | RUNNER_SERVER_VERSION: "3.11.16" |
20 | 20 | jobs: |
21 | 21 | build: |
|
28 | 28 | # |
29 | 29 | fail-fast: false |
30 | 30 | matrix: |
31 | | - include: |
| 31 | + include: &buildVariants |
32 | 32 | # go tool dist list -json to get the source |
33 | 33 | - {GOOS: android, GOARCH: 386, TARGET: i686-linux-android } |
34 | 34 | - {GOOS: android, GOARCH: amd64, TARGET: x86_64-linux-android } |
@@ -75,10 +75,12 @@ jobs: |
75 | 75 | env: |
76 | 76 | CGO_ENABLED: 0 # Only android should build with cgo |
77 | 77 | steps: |
78 | | - - uses: actions/checkout@v4 |
| 78 | + - &checkout |
| 79 | + uses: actions/checkout@v4 |
79 | 80 | with: |
80 | 81 | submodules: recursive |
81 | | - - name: Setup Go |
| 82 | + - &setupgo |
| 83 | + name: Setup Go |
82 | 84 | uses: actions/setup-go@v5 |
83 | 85 | with: |
84 | 86 | go-version: "${{ matrix.GOVERSION || vars.GOVERSION || '^1.16.0' }}" |
@@ -148,14 +150,48 @@ jobs: |
148 | 150 | name: bundle-${{matrix.GOOS}}-${{matrix.GOARCH}}${{matrix.GOARM}} |
149 | 151 | path: | |
150 | 152 | binary-${{matrix.GOOS}}-${{matrix.GOARCH}}${{matrix.GOARM}}.* |
| 153 | + create-vendor-archive: |
| 154 | + name: Create Archive with all dependencies |
| 155 | + runs-on: ubuntu-latest |
| 156 | + strategy: |
| 157 | + matrix: |
| 158 | + include: |
| 159 | + - buildVariants: *buildVariants |
| 160 | + steps: |
| 161 | + - *checkout |
| 162 | + - *setupgo |
| 163 | + - name: Run go mod vendor for each target |
| 164 | + uses: actions/github-script@v7 |
| 165 | + with: |
| 166 | + script: | |
| 167 | + const targets = ${{ tojson(matrix.buildVariants) }}; |
| 168 | + for (const env of targets) { |
| 169 | + const envVars = { |
| 170 | + ...process.env, |
| 171 | + ...env |
| 172 | + }; |
| 173 | + await exec.exec(`go`, ['env'], { env: envVars }); |
| 174 | + await exec.exec(`go`, ['mod', 'vendor'], { env: envVars }); |
| 175 | + } |
| 176 | + - name: Package |
| 177 | + run: | |
| 178 | + zip -r github-act-runner-full-src.zip . -x ".git/*" github-act-runner-full-src.zip github-act-runner-full-src.tar.gz |
| 179 | + tar --exclude=.git --exclude=github-act-runner-full-src.zip --exclude=github-act-runner-full-src.tar.gz -czf github-act-runner-full-src.tar.gz . |
| 180 | + - uses: actions/upload-artifact@v4 |
| 181 | + with: |
| 182 | + name: vendor |
| 183 | + path: | |
| 184 | + github-act-runner-full-src.* |
151 | 185 |
|
152 | 186 | ####################################### |
153 | 187 | ########## publish to github ########## |
154 | 188 | ####################################### |
155 | 189 | publish-to-github: |
156 | 190 | name: deploy to github |
157 | 191 | runs-on: ubuntu-latest |
158 | | - needs: build |
| 192 | + needs: |
| 193 | + - build |
| 194 | + - create-vendor-archive |
159 | 195 | if: ${{ github.event.inputs.skip-packaging != 'true' && github.event.inputs.version }} |
160 | 196 | continue-on-error: true |
161 | 197 | steps: |
|
0 commit comments