Skip to content

Commit

Permalink
Add circle ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Dec 2, 2024
1 parent acebc55 commit cbb745d
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 23 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2.1

workflows:
pack-binaries:
jobs:
- pack-binaries
- upload-binaries:
context:
- github
requires:
- pack-binaries

jobs:

pack-binaries:
machine:
image: ubuntu-2404:current
resource_class: arm.medium
steps:
- checkout

- run: |
mkdir -p ~/artifacts
node -p "require('./package').version" > ~/artifacts/pkg-version
- run: npm ci
- run: npm run build

- run: |
cd bin-aarch64 && tar -czf ../aarch64.gz *
mv ../aarch64.gz ~/artifacts
- persist_to_workspace:
root: ~/artifacts
paths:
- aarch64.gz
- pkg-version

upload-binaries:
docker:
- image: cimg/go:1.23.1
steps:
- attach_workspace:
at: /tmp/artifacts
- run: go install github.com/tcnksm/ghr@latest
- run: |
PKG_VERSION=`cat /tmp/artifacts/pkg-version`
ghr -u "node-3d" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -n "Release ${PKG_VERSION}" -replace ${PKG_VERSION} /tmp/artifacts/aarch64.gz
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ jobs:
draft: true
tag_name: ${{ steps.package-version.outputs.version }}
name: Release ${{ steps.package-version.outputs.version }}
body: Binaries at ${{ github.sha }}

build:
name: Build
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-14, [self-hosted, linux, ARM64]]
os: [ubuntu-22.04, windows-2022, macos-14]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Luis Blanco
Copyright (c) 2024 Luis Blanco

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cbb745d

Please sign in to comment.