4 Commits
0.1.0 ... 1.0.0

Author SHA1 Message Date
MartinBraquet
7183144d7b Fix release.sh perm 2025-08-04 09:54:27 +02:00
MartinBraquet
e87a2e9c8c Major release 2025-08-04 09:50:23 +02:00
MartinBraquet
b8da78f2fa Add cd 2025-08-04 09:50:14 +02:00
MartinBraquet
528402437b Clean 2025-08-04 09:50:07 +02:00
4 changed files with 61 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '22' # or match the version in .nvmrc or package.json node-version: '22'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci

31
.github/workflows/cd.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: CD
# Must select "Read and write permissions" in GitHub → Repo → Settings → Actions → General → Workflow permissions
on:
push:
branches: [ main, master ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
fetch-depth: 0 # To fetch all history for tags
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Tag and release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
./scripts/release.sh

View File

@@ -1,6 +1,6 @@
{ {
"name": "bayesbond", "name": "bayesbond",
"version": "0.1.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev --turbopack", "dev": "next dev --turbopack",

28
scripts/release.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Release script for release.yaml (a GitHub Action)
# Can be run locally as well if desired
# It creates a tag based on the version in pyproject.toml and creates a GitHub release based on the tag
set -e
cd "$(dirname "$0")"/..
tag=$(node -p "require('./package.json').version")
tagged=$(git tag -l $tag)
if [ -z "$tagged" ]; then
git tag -a "$tag" -m "Release $tag"
git push origin "$tag"
echo "Tagged release $tag"
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="$tag" \
--generate-notes
echo "Created release"
# Release to ...
else
echo "Tag $tag already exists"
fi