Skip to content

Commit b0e8cbd

Browse files
added release workflow
ISSUE: CLDSRVCLT-7
1 parent 96e82f2 commit b0e8cbd

File tree

234 files changed

+109
-28713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+109
-28713
lines changed

.github/workflows/release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release (e.g., 1.0.0)'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
release:
16+
name: Build and create release tag
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
cache: 'yarn'
28+
29+
- name: Install dependencies
30+
run: yarn install --frozen-lockfile
31+
32+
- name: Install Smithy CLI
33+
run: |
34+
mkdir -p smithy-install/smithy
35+
curl -L https://github.com/smithy-lang/smithy/releases/download/1.61.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip
36+
unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install
37+
mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy
38+
sudo smithy-install/smithy/install
39+
smithy --version
40+
41+
- name: Build
42+
run: yarn build
43+
44+
- name: Configure Git
45+
run: |
46+
git config user.name "github-actions[bot]"
47+
git config user.email "github-actions[bot]@users.noreply.github.com"
48+
49+
- name: Create release commit with build artifacts
50+
run: |
51+
# Force add build artifacts (even though they're in .gitignore)
52+
git add -f build/ dist/
53+
54+
# Create a commit with build artifacts
55+
git commit -m "Release v${{ inputs.version }}" || echo "No changes to commit"
56+
57+
# Create and push tag
58+
git tag -a "v${{ inputs.version }}" -m "Release version ${{ inputs.version }}"
59+
git push origin "v${{ inputs.version }}"
60+
61+
- name: Create GitHub Release
62+
uses: actions/create-release@v1
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
with:
66+
tag_name: v${{ inputs.version }}
67+
release_name: Release v${{ inputs.version }}
68+
draft: false
69+
prerelease: false

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ jobs:
2828
- name: Install dependencies
2929
run: yarn install --frozen-lockfile
3030

31+
- name: Install Smithy CLI
32+
run: |
33+
mkdir -p smithy-install/smithy
34+
curl -L https://github.com/smithy-lang/smithy/releases/download/1.61.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip
35+
unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install
36+
mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy
37+
sudo smithy-install/smithy/install
38+
smithy --version
39+
40+
- name: Build
41+
run: yarn build
42+
3143
- name: TypeScript typecheck
3244
run: yarn typecheck
3345

@@ -52,6 +64,18 @@ jobs:
5264
- name: Install dependencies
5365
run: yarn install --frozen-lockfile
5466

67+
- name: Install Smithy CLI
68+
run: |
69+
mkdir -p smithy-install/smithy
70+
curl -L https://github.com/smithy-lang/smithy/releases/download/1.61.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip
71+
unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install
72+
mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy
73+
sudo smithy-install/smithy/install
74+
smithy --version
75+
76+
- name: Build
77+
run: yarn build
78+
5579
- name: Start Cloudserver with MongoDB backend
5680
run: docker compose -f docker-compose.cloudserver-mongo.yml up -d
5781

@@ -92,6 +116,18 @@ jobs:
92116
- name: Install dependencies
93117
run: yarn install --frozen-lockfile
94118

119+
- name: Install Smithy CLI
120+
run: |
121+
mkdir -p smithy-install/smithy
122+
curl -L https://github.com/smithy-lang/smithy/releases/download/1.61.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip
123+
unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install
124+
mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy
125+
sudo smithy-install/smithy/install
126+
smithy --version
127+
128+
- name: Build
129+
run: yarn build
130+
95131
- name: Login to GitHub Container Registry
96132
uses: docker/login-action@v3
97133
with:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Build output
2+
build/
3+
dist/
4+
15
# Logs
26
logs
37
*.log

build/smithy/classpath.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)