|
9 | 9 | release:
|
10 | 10 | name: Create GitHub Release
|
11 | 11 | runs-on: ubuntu-latest
|
| 12 | + outputs: |
| 13 | + release_id: ${{ steps.create_release.outputs.id }} |
| 14 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
12 | 15 | steps:
|
13 | 16 | - uses: actions/checkout@v2
|
14 | 17 | with:
|
|
34 | 37 | release_name: ${{ steps.create_tag.outputs.tag }}
|
35 | 38 | draft: true
|
36 | 39 | prerelease: false
|
37 |
| - - name: Create artifact files |
38 |
| - shell: bash |
39 |
| - run: | |
40 |
| - mkdir info |
41 |
| - echo "${{ steps.create_release.outputs.id }}" > info/release_id |
42 |
| - echo "${{ steps.create_release.outputs.upload_url }}" > info/upload_url |
43 |
| - - uses: actions/upload-artifact@v1 |
44 |
| - with: |
45 |
| - name: info |
46 |
| - path: info |
47 | 40 |
|
48 | 41 | build:
|
49 | 42 | needs: [release]
|
|
53 | 46 | os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15, windows-2019 ]
|
54 | 47 | runs-on: ${{ matrix.os }}
|
55 | 48 | steps:
|
56 |
| - - uses: actions/download-artifact@v1 |
57 |
| - with: |
58 |
| - name: info |
59 |
| - - name: Set upload_url |
60 |
| - id: upload_info |
61 |
| - shell: bash |
62 |
| - run: | |
63 |
| - upload_url=$(cat info/upload_url) |
64 |
| - echo "::set-output name=upload_url::$upload_url" |
65 | 49 | - name: Set platform
|
66 | 50 | id: platform
|
67 | 51 | shell: bash
|
@@ -141,30 +125,21 @@ jobs:
|
141 | 125 | env:
|
142 | 126 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
143 | 127 | with:
|
144 |
| - upload_url: ${{ steps.upload_info.outputs.upload_url }} |
| 128 | + upload_url: ${{ needs.release.outputs.upload_url }} |
145 | 129 | asset_path: jruby-head-${{ steps.platform.outputs.platform }}.tar.gz
|
146 | 130 | asset_name: jruby-head-${{ steps.platform.outputs.platform }}.tar.gz
|
147 | 131 | asset_content_type: application/gzip
|
148 | 132 |
|
149 | 133 | metadata:
|
150 | 134 | name: Publish Release
|
151 |
| - needs: [build] |
| 135 | + needs: [release, build] |
152 | 136 | runs-on: ubuntu-latest
|
153 | 137 | steps:
|
154 |
| - - uses: actions/download-artifact@v1 |
155 |
| - with: |
156 |
| - name: info |
157 |
| - - name: Set publish_info |
158 |
| - id: publish_info |
159 |
| - shell: bash |
160 |
| - run: | |
161 |
| - release_id=$(cat info/release_id) |
162 |
| - echo "::set-output name=release_id::$release_id" |
163 | 138 | - uses: eregon/publish-release@v1
|
164 | 139 | env:
|
165 | 140 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
166 | 141 | with:
|
167 |
| - release_id: ${{ steps.publish_info.outputs.release_id }} |
| 142 | + release_id: ${{ needs.release.outputs.release_id }} |
168 | 143 | - uses: eregon/keep-last-n-releases@v1
|
169 | 144 | env:
|
170 | 145 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
0 commit comments