Skip to content

Commit c155750

Browse files
authored
Update release workflow (#1357)
1 parent 875a517 commit c155750

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

.github/workflows/release.yml

+40-40
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,44 @@ jobs:
2626
- id: echo
2727
run: |
2828
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+
- uses: mukunku/[email protected]
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+
2967
build:
3068
strategy:
3169
matrix:
@@ -87,48 +125,10 @@ jobs:
87125
with:
88126
name: ${{ runner.os }}-${{ runner.arch }}-binary
89127
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-
- uses: mukunku/[email protected]
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+
129129
upload-artifacts:
130130
name: Upload Artifacts
131-
needs: [tag-and-release]
131+
needs: [tag-and-release, build]
132132
runs-on: ubuntu-latest
133133
strategy:
134134
matrix:

0 commit comments

Comments
 (0)