Wiki - Deleted documentation folder and related scripts as it's moved… #415
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Covector | |
on: | |
push: | |
branches: [develop, production] | |
paths-ignore: | |
- "specs/**" | |
- "documentation/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
status: | |
name: Status | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Source Code | |
uses: actions/checkout@v3 | |
- name: Run Covector Status | |
uses: jbolda/covector/packages/action@covector-v0 | |
id: covector | |
with: | |
command: status | |
version-or-publish: | |
name: Version-or-publish | |
runs-on: ubuntu-latest | |
outputs: | |
change: ${{ steps.covector.outputs.change }} | |
commandRan: ${{ steps.covector.outputs.commandRan }} | |
successfulPublish: ${{ steps.covector.outputs.successfulPublish }} | |
steps: | |
- name: Checkout the Source Code | |
uses: actions/checkout@v3 | |
- name: Set Up Node.js 14 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "14" | |
registry-url: "https://registry.npmjs.org" | |
- name: Configure the Git User to Use | |
run: | | |
git config --global user.name "${{ github.event.pusher.name }}" | |
git config --global user.email "${{ github.event.pusher.email }}" | |
- name: Set up Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install Dasel | |
run: | | |
brew update --preinstall | |
brew install dasel | |
# Publish when no change file is present. | |
- id: covector | |
name: Run Covector Version-or-publish | |
uses: jbolda/covector/packages/action@covector-v0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
command: version-or-publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Create Pull Request with Versions Bumped | |
if: ${{ steps.covector.outputs.commandRan == 'version' }} | |
uses: iotaledger/create-pull-request@v3.4.1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: release/version-updates | |
title: Apply Version Updates From Current Changes | |
commit-message: apply version updates | |
labels: i-release | |
body: ${{ steps.covector.outputs.change }} | |
nodejs-binding-prebuild: | |
name: Build Prebuilt Binaries for Node.js | |
needs: version-or-publish | |
if: needs.version-or-publish.outputs.successfulPublish == 'true' | |
runs-on: ${{ matrix.os }} | |
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-latest, macos-latest, windows-2019] | |
steps: | |
- name: Checkout the Source Code | |
uses: actions/checkout@v3 | |
- name: Set Up Stable Rust | |
uses: ./.github/actions/setup-rust | |
with: | |
toolchain: stable | |
cache: false | |
- name: Set up Node.js 16.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16.x" | |
- name: Install required packages (Ubuntu) | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libudev-dev libusb-1.0-0-dev | |
# Temporary fix for "ValueError: invalid mode: 'rU' while trying to load binding.gyp" | |
# This can be removed when "prebuild" updates "node-gyp" | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Run Yarn Install | |
working-directory: client/bindings/nodejs/ | |
run: yarn install | |
- name: Build Node.js Prebuilds | |
working-directory: client/bindings/nodejs/ | |
run: yarn prebuild | |
- name: Upload Prebuilds to GitHub Release | |
working-directory: client/bindings/nodejs/ | |
run: yarn prebuild --upload-all ${{ secrets.GITHUB_TOKEN }} --tag-prefix nodejs-binding-v |