Skip to content

Commit 23e792a

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

File tree

235 files changed

+102
-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.

235 files changed

+102
-28713
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Setup Smithy CLI'
2+
description: 'Install Smithy CLI for building the project'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Install Smithy CLI
8+
shell: bash
9+
env:
10+
SMITHY_VERSION: '1.61.0'
11+
run: |
12+
mkdir -p smithy-install/smithy
13+
curl -L https://github.com/smithy-lang/smithy/releases/download/${SMITHY_VERSION}/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip
14+
unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install
15+
mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy
16+
sudo smithy-install/smithy/install
17+
smithy --version

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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: Setup Smithy CLI
33+
uses: ./.github/actions/setup-smithy
34+
35+
- name: Build
36+
run: yarn build
37+
38+
- name: Configure Git
39+
run: |
40+
git config user.name "github-actions[bot]"
41+
git config user.email "github-actions[bot]@users.noreply.github.com"
42+
43+
- name: Create release commit with build artifacts
44+
run: |
45+
# Force add build artifacts (even though they're in .gitignore)
46+
git add -f build/ dist/
47+
48+
# Create a commit with build artifacts
49+
git commit -m "Release v${{ inputs.version }}" || echo "No changes to commit"
50+
51+
# Create and push tag
52+
git tag -a "v${{ inputs.version }}" -m "Release version ${{ inputs.version }}"
53+
git push origin "v${{ inputs.version }}"
54+
55+
- name: Create GitHub Release
56+
uses: actions/create-release@v1
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
tag_name: v${{ inputs.version }}
61+
release_name: Release v${{ inputs.version }}
62+
draft: false
63+
prerelease: false

.github/workflows/test.yml

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

31+
- name: Setup Smithy CLI
32+
uses: ./.github/actions/setup-smithy
33+
34+
- name: Build
35+
run: yarn build
36+
3137
- name: TypeScript typecheck
3238
run: yarn typecheck
3339

@@ -52,6 +58,12 @@ jobs:
5258
- name: Install dependencies
5359
run: yarn install --frozen-lockfile
5460

61+
- name: Setup Smithy CLI
62+
uses: ./.github/actions/setup-smithy
63+
64+
- name: Build
65+
run: yarn build
66+
5567
- name: Start Cloudserver with MongoDB backend
5668
run: docker compose -f docker-compose.cloudserver-mongo.yml up -d
5769

@@ -92,6 +104,12 @@ jobs:
92104
- name: Install dependencies
93105
run: yarn install --frozen-lockfile
94106

107+
- name: Setup Smithy CLI
108+
uses: ./.github/actions/setup-smithy
109+
110+
- name: Build
111+
run: yarn build
112+
95113
- name: Login to GitHub Container Registry
96114
uses: docker/login-action@v3
97115
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)