Skip to content

Commit 799a706

Browse files
authored
Create create_release.yml (#23)
create initial workflow for creating a new release
1 parent ec545af commit 799a706

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/create_release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: The version of the release, in the format of '1.2.3'. Must match all package.json versions.
8+
required: true
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-release
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build-core:
16+
uses: ./.github/workflows/build_core.yml
17+
build-cloudflare:
18+
uses: ./.github/workflows/build_cloudflare.yml
19+
build-fastly:
20+
uses: ./.github/workflows/build_fastly.yml
21+
package:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 15
24+
needs: [build-core, build-cloudflare, build-fastly]
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Get Version
28+
run: |
29+
LIB_VERSION=$(cat package.json | jq -r .version)
30+
CF_VERSION=$(cat bindings/cloudflare/package.json | jq -r .version)
31+
FASTLY_VERSION=$(cat bindings/fastly/package.json | jq -r .version)
32+
if [ "$LIB_VERSION" != ${{ inputs.version }}" ] || [ "$LIB_VERSION" != "$CLOUDFLARE_VERSION" ] || [ "$LIB_VERSION" != "$CLOUDFLARE_VERSION" ]; then
33+
echo "Error: package.json versions do not match."
34+
echo "Input Version: ${{ inputs.tags }}, Library: $LIB_VERSION, Cloudflare: $CF_VERSION, Fastly: $FASTLY_VERSION"
35+
exit 1
36+
fi
37+
echo "VERSION=$LIB_VERSION >> "$GITHUB_OUTPUT"
38+
id: version
39+
- uses: actions/download-artifact@v4
40+
with:
41+
name: core-library-artifacts
42+
path: dist
43+
- uses: actions/download-artifact@v4
44+
with:
45+
name: cloudflare-artifacts
46+
path: bindings/cloudflare/dist
47+
- uses: actions/download-artifact@v4
48+
with:
49+
name: fastly-artifacts
50+
path: bindings/fastly/dist
51+
# TODO: package and upload release

0 commit comments

Comments
 (0)