mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-04 14:53:33 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7183144d7b | ||
|
|
e87a2e9c8c | ||
|
|
b8da78f2fa | ||
|
|
528402437b |
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@@ -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
31
.github/workflows/cd.yml
vendored
Normal 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
|
||||||
@@ -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
28
scripts/release.sh
Executable 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
|
||||||
Reference in New Issue
Block a user