Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions #22

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actions/node-manager/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: node-manager
description: 'Setup node and install yarn'
inputs:
node-version:
description: 'Node version'
required: true
default: 18
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

- name: Install yarn
shell: bash
run: npm install -g yarn
28 changes: 15 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ jobs:
env:
CURRENT_RUNNER: ${{ runner.name }}

- uses: actions/setup-node@v4
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}

- name: build-and-lint
shell: bash
run: |
./bin/node-version-manager.sh yarn install --production=false --frozen-lockfile
./bin/node-version-manager.sh yarn build
./bin/node-version-manager.sh yarn lint
yarn install --production=false --frozen-lockfile
yarn build
yarn lint

dry-run-publish:
needs: [ build-and-lint ]
Expand All @@ -42,16 +43,17 @@ jobs:
CURRENT_RUNNER: ${{ runner.name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- uses: actions/setup-node@v4
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}

- name: dry-run-publish
shell: bash
run: |
./bin/node-version-manager.sh yarn install --production=false --frozen-lockfile
./bin/node-version-manager.sh yarn build
./bin/node-version-manager.sh npm publish --access public --tag latest --dry-run
yarn install --production=false --frozen-lockfile
yarn build
npm publish --access public --tag latest --dry-run

publish-npm:
needs: [ dry-run-publish ]
Expand All @@ -67,14 +69,14 @@ jobs:
CURRENT_RUNNER: ${{ runner.name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}

- name: publish-npm
shell: bash
run: |
./bin/node-version-manager.sh yarn install --production=false --frozen-lockfile
./bin/node-version-manager.sh yarn build
./bin/node-version-manager.sh npm publish --access public --tag latest
yarn install --production=false --frozen-lockfile
yarn build
npm publish --access public --tag latest
19 changes: 0 additions & 19 deletions bin/node-version-manager.sh

This file was deleted.

Loading