|
26 | 26 | - id: echo
|
27 | 27 | run: |
|
28 | 28 | echo "::set-output name=version::1.$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate | tr -d '-' | tr -d '"').0"
|
| 29 | + check-tag: |
| 30 | + name: Check tag is new |
| 31 | + outputs: |
| 32 | + exists: ${{ steps.check_tag.outputs.exists }} |
| 33 | + needs: [version] |
| 34 | + runs-on: ubuntu-latest |
| 35 | + steps: |
| 36 | + - name: Checkout Repo |
| 37 | + uses: actions/checkout@v3 |
| 38 | + with: |
| 39 | + fetch-depth: 0 |
| 40 | + |
| 41 | + id: check_tag |
| 42 | + with: |
| 43 | + tag: v${{ needs.version.outputs.version }} |
| 44 | + env: |
| 45 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 46 | + |
| 47 | + tag-and-release: |
| 48 | + name: Tag & Release |
| 49 | + outputs: |
| 50 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 51 | + needs: [check-tag, version] |
| 52 | + runs-on: ubuntu-latest |
| 53 | + if: ${{ needs.check-tag.outputs.exists != 'true' }} |
| 54 | + steps: |
| 55 | + - name: Checkout Repo |
| 56 | + uses: actions/checkout@v3 |
| 57 | + with: |
| 58 | + fetch-depth: 0 |
| 59 | + - run: git tag v${{ needs.version.outputs.version }} && git push origin v${{ needs.version.outputs.version }} |
| 60 | + - uses: ncipollo/release-action@v1 |
| 61 | + id: create_release |
| 62 | + with: |
| 63 | + generateReleaseNotes: true |
| 64 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + tag: v${{ needs.version.outputs.version }} |
| 66 | + |
29 | 67 | build:
|
30 | 68 | strategy:
|
31 | 69 | matrix:
|
@@ -87,48 +125,10 @@ jobs:
|
87 | 125 | with:
|
88 | 126 | name: ${{ runner.os }}-${{ runner.arch }}-binary
|
89 | 127 | path: bazel-bin/src/workerd/server/workerd${{ runner.os == 'Windows' && '.exe' || '' }}
|
90 |
| - check-tag: |
91 |
| - name: Check tag is new |
92 |
| - outputs: |
93 |
| - exists: ${{ steps.check_tag.outputs.exists }} |
94 |
| - needs: [version, build] |
95 |
| - runs-on: ubuntu-latest |
96 |
| - steps: |
97 |
| - - name: Checkout Repo |
98 |
| - uses: actions/checkout@v3 |
99 |
| - with: |
100 |
| - fetch-depth: 0 |
101 |
| - |
102 |
| - id: check_tag |
103 |
| - with: |
104 |
| - tag: v${{ needs.version.outputs.version }} |
105 |
| - env: |
106 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
107 |
| - |
108 |
| - tag-and-release: |
109 |
| - name: Tag & Release |
110 |
| - outputs: |
111 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
112 |
| - needs: [check-tag, version, build] |
113 |
| - runs-on: ubuntu-latest |
114 |
| - if: needs.check-tag.outputs.exists != 'true' |
115 |
| - steps: |
116 |
| - - run: echo ${{ needs.check-tag.outputs.exists }} |
117 |
| - - name: Checkout Repo |
118 |
| - uses: actions/checkout@v3 |
119 |
| - with: |
120 |
| - fetch-depth: 0 |
121 |
| - - run: git tag v${{ needs.version.outputs.version }} && git push origin v${{ needs.version.outputs.version }} |
122 |
| - - uses: ncipollo/release-action@v1 |
123 |
| - id: create_release |
124 |
| - with: |
125 |
| - generateReleaseNotes: true |
126 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
127 |
| - tag: v${{ needs.version.outputs.version }} |
128 |
| - |
| 128 | + |
129 | 129 | upload-artifacts:
|
130 | 130 | name: Upload Artifacts
|
131 |
| - needs: [tag-and-release] |
| 131 | + needs: [tag-and-release, build] |
132 | 132 | runs-on: ubuntu-latest
|
133 | 133 | strategy:
|
134 | 134 | matrix:
|
|
0 commit comments