-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add .github/workflows/sync-base.yml workflow
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Publish Nu Base Pkg to NPM | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/sync-base | ||
|
||
jobs: | ||
publish-npm-base: | ||
name: Publish the base NPM package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set the release version | ||
shell: bash | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | ||
|
||
- name: Install node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- uses: hustcer/[email protected] | ||
with: | ||
version: 0.92.1 | ||
|
||
- name: Publish the base package | ||
continue-on-error: true | ||
shell: nu {0} | ||
run: nu nu/npm.nu base | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
test-npm-pkg: | ||
needs: publish-npm-base | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
name: Test Nu@npm on x64-${{matrix.os}} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Test Nu Install from NPM Registry | ||
shell: bash | ||
run: | | ||
export NU_TAG=`jq -r .distTag npm/app/package.json` | ||
echo "Installing Nu@$NU_TAG from npm..." | ||
npm i --location=global "nushell@$NU_TAG" --registry https://registry.npmjs.org | ||
echo 'Nu version info:'; nu -c 'version' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |