Skip to content

Commit

Permalink
chore(ci): fix publish packages (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Dec 4, 2024
1 parent f1f7de0 commit a79a047
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bindings.nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
environment:
name: npmjs.com
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/bindings.python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,5 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verify-metadata: false
packages-dir: bindings/python/artifacts
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ jobs:
curl -sSfLo /tmp/nfpm.tar.gz https://github.com/goreleaser/nfpm/releases/download/v2.28.0/nfpm_2.28.0_Linux_x86_64.tar.gz
tar -xzf /tmp/nfpm.tar.gz -C /tmp
sudo mv /tmp/nfpm /usr/local/bin/nfpm
- name: Setup yq
shell: bash
run: |
curl -sSfLo /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x /usr/local/bin/yq
- name: Download
shell: bash
env:
Expand All @@ -150,9 +155,9 @@ jobs:
- name: Package
shell: bash
run: |
arch=${{ matrix.arch }}
version=${{ github.ref_name }}
nfpm package --packager ${{ matrix.packager }} --target dist/pkg/ -f <(envsubst '${arch} ${version}' < nfpm.yaml)
yq -i '.arch = "${{ matrix.arch }}"' nfpm.yaml
yq -i '.version = "${{ github.ref_name }}"' nfpm.yaml
nfpm package --packager ${{ matrix.packager }} --target dist/pkg/
- name: Publish
shell: bash
env:
Expand Down
6 changes: 4 additions & 2 deletions bindings/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
"main": "index.js",
"types": "index.d.ts",
"description": "Databend Driver Node.js Binding",
"repository": "https://github.com/databendlabs/bendsql.git",
"repository": {
"url": "git+https://github.com/databendlabs/bendsql.git"
},
"napi": {
"name": "databend-driver",
"package": {
"name": "@databend-driver/lib"
},
"triples": {
"defaults": true,
"defaults": false,
"additional": [
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
Expand Down
2 changes: 0 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version = 2
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
ignore = [
"RUSTSEC-2024-0332",
"RUSTSEC-2024-0370",
"RUSTSEC-2024-0379",
"RUSTSEC-2024-0384"
Expand All @@ -21,7 +20,6 @@ allow = [
"MIT",
"MPL-2.0",
"OpenSSL",
"Unicode-DFS-2016",
"Unicode-3.0"
]

Expand Down
4 changes: 2 additions & 2 deletions nfpm.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "bendsql"
arch: "${arch}"
arch: ""
platform: "linux"
version: "${version}"
version: ""
section: "database"
priority: "extra"
maintainer: "Databend Authors <[email protected]>"
Expand Down

0 comments on commit a79a047

Please sign in to comment.