@ibidathoillah/indodax-cli 0.1.23 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kraken_dockerfile.tmp +17 -0
- package/package.json +1 -1
- package/release_template_no_wasm.yml.tmp +200 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Build stage
|
|
2
|
+
FROM rust:1-slim-bullseye AS builder
|
|
3
|
+
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
COPY . .
|
|
6
|
+
|
|
7
|
+
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
|
|
8
|
+
RUN cargo build --release
|
|
9
|
+
|
|
10
|
+
# Final stage
|
|
11
|
+
FROM debian:bullseye-slim
|
|
12
|
+
|
|
13
|
+
RUN apt-get update && apt-get install -y ca-certificates libssl1.1 && rm -rf /var/lib/apt/lists/*
|
|
14
|
+
|
|
15
|
+
COPY --from=builder /app/target/release/kraken /usr/local/bin/kraken
|
|
16
|
+
|
|
17
|
+
ENTRYPOINT ["kraken"]
|
package/package.json
CHANGED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
packages: write
|
|
10
|
+
contents: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-and-release:
|
|
14
|
+
name: Build and Release
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
include:
|
|
20
|
+
- os: ubuntu-latest
|
|
21
|
+
target: x86_64-unknown-linux-gnu
|
|
22
|
+
artifact_name: PROJECT_NAME-linux-x86_64
|
|
23
|
+
binary_extension: ""
|
|
24
|
+
- os: ubuntu-latest
|
|
25
|
+
target: aarch64-unknown-linux-gnu
|
|
26
|
+
artifact_name: PROJECT_NAME-linux-aarch64
|
|
27
|
+
binary_extension: ""
|
|
28
|
+
- os: macos-latest
|
|
29
|
+
target: x86_64-apple-darwin
|
|
30
|
+
artifact_name: PROJECT_NAME-macos-x86_64
|
|
31
|
+
binary_extension: ""
|
|
32
|
+
- os: macos-latest
|
|
33
|
+
target: aarch64-apple-darwin
|
|
34
|
+
artifact_name: PROJECT_NAME-macos-aarch64
|
|
35
|
+
binary_extension: ""
|
|
36
|
+
- os: windows-latest
|
|
37
|
+
target: x86_64-pc-windows-msvc
|
|
38
|
+
artifact_name: PROJECT_NAME-windows-x86_64
|
|
39
|
+
binary_extension: ".exe"
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- name: Checkout
|
|
43
|
+
uses: actions/checkout@v4
|
|
44
|
+
|
|
45
|
+
- name: Install Rust
|
|
46
|
+
uses: dtolnay/rust-toolchain@stable
|
|
47
|
+
with:
|
|
48
|
+
targets: ${{ matrix.target }}
|
|
49
|
+
|
|
50
|
+
- name: Install cross-compilation tools (Linux ARM64)
|
|
51
|
+
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
52
|
+
run: |
|
|
53
|
+
sudo apt-get update
|
|
54
|
+
sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
55
|
+
|
|
56
|
+
- name: Build
|
|
57
|
+
shell: bash
|
|
58
|
+
run: |
|
|
59
|
+
if [ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]; then
|
|
60
|
+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
cargo build --release --target ${{ matrix.target }}
|
|
64
|
+
|
|
65
|
+
BIN_DIR="target/${{ matrix.target }}/release"
|
|
66
|
+
cp "$BIN_DIR/PROJECT_NAME${{ matrix.binary_extension }}" "${{ matrix.artifact_name }}${{ matrix.binary_extension }}"
|
|
67
|
+
|
|
68
|
+
- name: Upload Artifact
|
|
69
|
+
uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: ${{ matrix.artifact_name }}
|
|
72
|
+
path: ${{ matrix.artifact_name }}${{ matrix.binary_extension }}
|
|
73
|
+
|
|
74
|
+
publish-cargo:
|
|
75
|
+
name: Publish to Cargo
|
|
76
|
+
needs: build-and-release
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
steps:
|
|
79
|
+
- name: Checkout
|
|
80
|
+
uses: actions/checkout@v4
|
|
81
|
+
- name: Install Rust
|
|
82
|
+
uses: dtolnay/rust-toolchain@stable
|
|
83
|
+
- name: Publish
|
|
84
|
+
env:
|
|
85
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
86
|
+
run: cargo publish --token $CARGO_REGISTRY_TOKEN --no-verify --allow-dirty || echo "Already published"
|
|
87
|
+
|
|
88
|
+
publish-npm:
|
|
89
|
+
name: Publish to NPM
|
|
90
|
+
needs: build-and-release
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
steps:
|
|
93
|
+
- name: Checkout
|
|
94
|
+
uses: actions/checkout@v4
|
|
95
|
+
- name: Setup Node
|
|
96
|
+
uses: actions/setup-node@v4
|
|
97
|
+
with:
|
|
98
|
+
node-version: '20'
|
|
99
|
+
registry-url: 'https://registry.npmjs.org'
|
|
100
|
+
- name: Publish
|
|
101
|
+
env:
|
|
102
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
103
|
+
run: npm publish --access public || echo "Already published"
|
|
104
|
+
|
|
105
|
+
publish-docker:
|
|
106
|
+
name: Publish to Docker Hub
|
|
107
|
+
needs: build-and-release
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
steps:
|
|
110
|
+
- name: Checkout
|
|
111
|
+
uses: actions/checkout@v4
|
|
112
|
+
- name: Log in to Docker Hub
|
|
113
|
+
uses: docker/login-action@v3
|
|
114
|
+
with:
|
|
115
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
|
116
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
117
|
+
- name: Build and Push Docker Image
|
|
118
|
+
uses: docker/build-push-action@v5
|
|
119
|
+
with:
|
|
120
|
+
context: .
|
|
121
|
+
file: ./Dockerfile
|
|
122
|
+
push: true
|
|
123
|
+
tags: |
|
|
124
|
+
${{ secrets.DOCKER_USERNAME }}/PROJECT_NAME-cli:${{ github.ref_name }}
|
|
125
|
+
${{ secrets.DOCKER_USERNAME }}/PROJECT_NAME-cli:latest
|
|
126
|
+
|
|
127
|
+
publish-gpr:
|
|
128
|
+
name: Publish to GitHub Packages (NPM)
|
|
129
|
+
needs: build-and-release
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
permissions:
|
|
132
|
+
contents: read
|
|
133
|
+
packages: write
|
|
134
|
+
steps:
|
|
135
|
+
- name: Checkout
|
|
136
|
+
uses: actions/checkout@v4
|
|
137
|
+
- name: Setup Node
|
|
138
|
+
uses: actions/setup-node@v4
|
|
139
|
+
with:
|
|
140
|
+
node-version: "20"
|
|
141
|
+
registry-url: "https://npm.pkg.github.com"
|
|
142
|
+
scope: "@ibidathoillah"
|
|
143
|
+
- name: Publish to GPR
|
|
144
|
+
env:
|
|
145
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
146
|
+
run: |
|
|
147
|
+
sed -i 's|https://registry.npmjs.org|https://npm.pkg.github.com|g' package.json || true
|
|
148
|
+
npm publish || echo "Already published to GPR"
|
|
149
|
+
|
|
150
|
+
publish-ghcr:
|
|
151
|
+
name: Publish to GHCR
|
|
152
|
+
needs: build-and-release
|
|
153
|
+
runs-on: ubuntu-latest
|
|
154
|
+
permissions:
|
|
155
|
+
contents: read
|
|
156
|
+
packages: write
|
|
157
|
+
steps:
|
|
158
|
+
- name: Checkout
|
|
159
|
+
uses: actions/checkout@v4
|
|
160
|
+
- name: Log in to GHCR
|
|
161
|
+
uses: docker/login-action@v3
|
|
162
|
+
with:
|
|
163
|
+
registry: ghcr.io
|
|
164
|
+
username: ${{ github.actor }}
|
|
165
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
166
|
+
- name: Build and Push to GHCR
|
|
167
|
+
uses: docker/build-push-action@v5
|
|
168
|
+
with:
|
|
169
|
+
context: .
|
|
170
|
+
file: ./Dockerfile
|
|
171
|
+
push: true
|
|
172
|
+
tags: |
|
|
173
|
+
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
|
174
|
+
ghcr.io/${{ github.repository }}:latest
|
|
175
|
+
|
|
176
|
+
github-release:
|
|
177
|
+
name: GitHub Release
|
|
178
|
+
needs: build-and-release
|
|
179
|
+
runs-on: ubuntu-latest
|
|
180
|
+
steps:
|
|
181
|
+
- name: Checkout
|
|
182
|
+
uses: actions/checkout@v4
|
|
183
|
+
- name: Download Artifacts
|
|
184
|
+
uses: actions/download-artifact@v4
|
|
185
|
+
with:
|
|
186
|
+
merge-multiple: true
|
|
187
|
+
|
|
188
|
+
- name: Create Release
|
|
189
|
+
uses: softprops/action-gh-release@v2
|
|
190
|
+
with:
|
|
191
|
+
files: |
|
|
192
|
+
PROJECT_NAME-linux-x86_64
|
|
193
|
+
PROJECT_NAME-linux-aarch64
|
|
194
|
+
PROJECT_NAME-macos-x86_64
|
|
195
|
+
PROJECT_NAME-macos-aarch64
|
|
196
|
+
PROJECT_NAME-windows-x86_64.exe
|
|
197
|
+
body_path: RELEASE_NOTES.md
|
|
198
|
+
fail_on_unmatched_files: false
|
|
199
|
+
env:
|
|
200
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|