Skip to content
Closed

V2 #2

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Build TypeScript Project
name: Check Go Project

on:
push:
Expand All @@ -13,15 +13,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm run build
- run: go vet ./...
- run: go test -race ./...
- run: go build ./cmd/data-localizer
- run: npm run build
- run: node bindings/node/smoke-test.js
- run: npm pack --dry-run
55 changes: 18 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,31 @@
name: Auto Release from Package Version
name: Verify Go Release

on:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:

permissions:
contents: write

concurrency:
group: auto-release
cancel-in-progress: false

jobs:
release:
verify:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Read package version
id: version
shell: bash
run: |
VERSION="$(node -p "require('./package.json').version")"
TAG="v${VERSION}"

echo "tag=${TAG}" >> "$GITHUB_OUTPUT"

if git ls-remote --exit-code --tags origin "refs/tags/${TAG}" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "${TAG} already exists; no release is needed."
else
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "Creating release ${TAG}."
fi
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Create GitHub Release
if: steps.version.outputs.exists == 'false'
uses: softprops/action-gh-release@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
tag_name: ${{ steps.version.outputs.tag }}
name: Release ${{ steps.version.outputs.tag }}
target_commitish: ${{ github.sha }}
generate_release_notes: true
node-version: "22"

- run: go test -race ./...
- run: go vet ./...
- run: go build ./cmd/data-localizer
- run: npm run build
- run: node bindings/node/smoke-test.js
- run: npm pack --dry-run
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
node_modules
/bin/
dist
.pnpm-store
/.gocache/
/.gomodcache/
/.gotelemetry/
/.npm-cache/
/coverage.out
*.exe
*.test
docs
node_modules
*.npm-cache
14 changes: 12 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
node_modules
src
tests
.gocache
.gomodcache
.gotelemetry
.npm-cache
bin
bindings
cmd
docs
tools
*.go
go.mod
go.sum
Loading
Loading