Skip to content

Commit

Permalink
Another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Apr 17, 2024
1 parent 6ba2470 commit 25eca54
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 38 deletions.
73 changes: 37 additions & 36 deletions .github/workflows/bindings-nodejs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,63 @@ env:
CARGO_INCREMENTAL: 0

jobs:
publish-nodejs:
runs-on: ubuntu-latest
# publish-nodejs:
# runs-on: ubuntu-latest

defaults:
run:
working-directory: bindings/nodejs
# defaults:
# run:
# working-directory: bindings/nodejs

steps:
- uses: actions/checkout@v3
# steps:
# - uses: actions/checkout@v3

- name: Set up Rust
uses: ./.github/actions/setup-rust
# - name: Set up Rust
# uses: ./.github/actions/setup-rust

# Required for ledger-nano
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
# # Required for ledger-nano
# - name: Install required packages
# run: |
# sudo apt-get update
# sudo apt-get install libudev-dev libusb-1.0-0-dev

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: "18.x"
# registry-url: "https://registry.npmjs.org"

- name: Install Yarn
run: npm i -g yarn
# - name: Install Yarn
# run: npm i -g yarn

- name: Install JS dependencies
run: yarn
# - name: Install JS dependencies
# run: yarn

- name: Build project
run: yarn build
# - name: Build project
# run: yarn build

- name: Update Cargo.toml with git
run: sed -i 's#path = "../core"#git = "https://github.com/iotaledger/iota-sdk", rev = "'$GITHUB_SHA'"#g' Cargo.toml
# - name: Update Cargo.toml with git
# run: sed -i 's#path = "../core"#git = "https://github.com/iotaledger/iota-sdk", rev = "'$GITHUB_SHA'"#g' Cargo.toml

- name: Print Cargo.toml
run: cat Cargo.toml
# - name: Print Cargo.toml
# run: cat Cargo.toml

- name: Publish nodejs bindings to NPM
shell: sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn publish --access public --tag alpha
# - name: Publish nodejs bindings to NPM
# shell: sh
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: yarn publish --access public --tag alpha

nodejs-binding-prebuild:
runs-on: ${{ matrix.os }}
needs: publish-nodejs
# needs: publish-nodejs
strategy:
fail-fast: false
matrix:
# The GitHub hosted Windows 2022 image comes with Visual Studio 2022, but node-gyp
# (which is used by neon-sys) sadly fails to recognize it. As a mitigation, we still run the
# tests on Windows 2019, until we can figure out a way to fix the problem.
os: [ubuntu-20.04, macos-13, windows-2019]
# os: [ubuntu-20.04, macos-13, windows-2019]
os: [macos-13]
node-version: ["18.x"]

steps:
Expand Down
6 changes: 4 additions & 2 deletions bindings/nodejs/gon-config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"source": ["./build/Release/index.node"],
"source": [
"./build/Release/index.node"
],
"bundle_id": "org.iota.sdk-nodejs",
"apple_id": {
"password": "@env:AC_PASSWORD"
"provider": "UG77RJKZHH"
},
"sign": {
"application_identity": "Developer ID Application: IOTA Stiftung (UG77RJKZHH)"
Expand Down

0 comments on commit 25eca54

Please sign in to comment.