Add openssl legacy to build #339
Workflow file for this run
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: Build | |
on: | |
# Run this workflow for pushes on all branches | |
push: | |
branches: | |
- '**' | |
# Run this workflow when a tag or branch is created | |
create: | |
# Run this workflow for pull requests | |
pull_request: | |
env: | |
NODE_OPTIONS: --openssl-legacy-provider | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [15.x, 16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint files | |
run: npm run lint:check | |
- name: Build library | |
run: npm run build | |
- name: Run tests | |
run: | | |
npm install --no-save @vue/composition-api | |
npm run test:unit | |
npm prune @vue/composition-api | |
npm prune --production | |
build_and_publish_package: | |
# Only run this job if the run_tests job has succeeded, and if | |
# this workflow was triggered by the creation of a new tag | |
needs: run_tests | |
if: github.event_name == 'create' && github.event.ref_type == 'tag' && github.event.repository.fork == false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm run build | |
- run: npm prune --production | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |