Skip to content

Commit dd09d1c

Browse files
Create release-test workflow for versioning
This workflow automates the release process, allowing manual version input and performing necessary build steps.
1 parent 7eea8e1 commit dd09d1c

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

.github/workflows/release-test.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Release Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Enter the version for this release'
8+
required: true
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
env:
14+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
15+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
16+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
17+
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
18+
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
19+
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
with:
24+
ref: 'main' # Ensures the main branch is checked out
25+
token: ${{ secrets.PAT_GITHUB }}
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: '18'
31+
registry-url: 'https://registry.npmjs.org/'
32+
33+
- name: Debug - Check packages/tools after checkout
34+
run: |
35+
echo "=== After checkout ==="
36+
echo "Current branch:"
37+
git branch -a
38+
echo "Current commit:"
39+
git log -1 --oneline
40+
echo "Remote origin URL:"
41+
git remote -v
42+
echo "Files in packages/tools:"
43+
ls -la packages/tools/ 2>&1 || echo "Directory does not exist"
44+
echo "Git status of packages/tools:"
45+
git status packages/tools/ 2>&1 || echo "No status"
46+
47+
- name: Reset local changes
48+
run: |
49+
git fetch origin main
50+
git reset --hard origin/main
51+
git clean -fdx
52+
53+
- name: Debug - Check packages/tools after reset
54+
run: |
55+
echo "=== After git reset --hard ==="
56+
echo "Current commit:"
57+
git log -1 --oneline
58+
echo "Files in packages/tools:"
59+
ls -la packages/tools/ 2>&1 || echo "Directory does not exist"
60+
echo "Git status of packages/tools:"
61+
git status packages/tools/ 2>&1 || echo "No status"
62+
echo "What git thinks should be in packages/tools:"
63+
git ls-tree -r HEAD --name-only | grep "^packages/tools/" | head -20 || echo "No files found"
64+
65+
- name: Configure git user
66+
run: |
67+
git config user.name "Dariel Noel"
68+
git config user.email "[email protected]"
69+
70+
- name: Install dependencies
71+
run: npm install --also=dev
72+
73+
- name: Debug - Check packages/tools after npm install
74+
run: |
75+
echo "=== After npm install ==="
76+
echo "Files in packages/tools:"
77+
ls -la packages/tools/ 2>&1 || echo "Directory does not exist"
78+
echo "Git status of packages/tools:"
79+
git status packages/tools/ 2>&1 || echo "No status"
80+
81+
- name: Build production version
82+
run: npm run build
83+
84+
- name: Debug - Check packages/tools after build
85+
run: |
86+
echo "=== After build ==="
87+
echo "Files in packages/tools:"
88+
ls -la packages/tools/ 2>&1 || echo "Directory does not exist"
89+
echo "Git status of packages/tools:"
90+
git status packages/tools/ 2>&1 || echo "No status"
91+
92+
- name: Display changes
93+
run: |
94+
echo "Showing status..."
95+
git status
96+
echo "Showing diff..."
97+
git diff
98+
99+
- name: Update package.json version and create Git tag
100+
run: npm version ${{ github.event.inputs.version }}
101+
102+

0 commit comments

Comments
 (0)