Skip to content

Conversation

@xingrz
Copy link
Contributor

@xingrz xingrz commented Mar 28, 2022

The new workflow:

  1. Build and archive the bindings on all three windows-latest, linux-latest and darwin-latest platforms
  2. Run tests with prebuilds on all these three platform, along with Node 12, 14 and 16
  3. At last, only if the build was trigger by a push of tag starts with v*, publish it to NPM

What need to do to make this migration works:

  1. Generate a new access token on NPM: https://www.npmjs.com/settings/<yourname>/tokens with at least a Publish permission
  2. Add a new repository secret named NPM_TOKEN on https://github.com/node-ffi-napi/node-ffi-napi/settings/secrets/actions with the token just created.

Here's how to publish a new version:

npm version 4.0.4  # npm will create a git tag v4.0.4 automatically
git push origin master --tags

@xingrz xingrz force-pushed the migrate-github-actions branch 2 times, most recently from f953c5f to d55d9be Compare March 28, 2022 18:32
@xingrz xingrz force-pushed the migrate-github-actions branch from d55d9be to ebf1dd4 Compare March 28, 2022 18:33
@miserylee
Copy link

any process?

Copy link

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!!


steps:
- name: Checkout repository
uses: actions/checkout@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v3

uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/setup-python@v2
uses: actions/setup-python@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python-version: 3.9
python-version: 3.x

- uses: actions/setup-node@v2

- name: Set up Node.js LTS
uses: actions/setup-node@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/setup-node@v2
uses: actions/setup-node@v3

run: npm run prebuild

- name: Upload artifacts for ${{ matrix.os }}
uses: actions/upload-artifact@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3

npm install node-gyp@latest
- name: Download prebuilt artifacts
uses: actions/download-artifact@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3


steps:
- name: Checkout repository
uses: actions/checkout@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v3

uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/setup-node@v2
uses: actions/setup-node@v3

cache: 'npm'

- name: Download prebuilt artifacts
uses: actions/download-artifact@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

node-version: ${{ matrix.node }}
cache: 'npm'

- name: Update node-gyp for Node.js <= 14 on Windows
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed because v14 is end-of-life.

@cclauss cclauss mentioned this pull request Jul 14, 2023
@cclauss
Copy link

cclauss commented Jul 28, 2023

A gentle nudge on this, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants