Skip to content

removing SWA deployment as no longer needed #38

removing SWA deployment as no longer needed

removing SWA deployment as no longer needed #38

Workflow file for this run

name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [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 }}
- run: npm i -g npm@latest
- run: npm i -ws
- run: npm run lint -ws
- run: npm run build -ws
# TODO - tests
# - run: npm test
package:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 20.x
- run: npm i -g npm@latest
- run: npm i -ws
- run: npm run build -ws
- run: npm version prerelease --preid=ci-$GITHUB_RUN_ID --no-git-tag-version -ws
- run: npm pack -ws
- name: Upload
uses: actions/upload-artifact@v2
with:
name: package
path: "aaronpowell*.tgz"
publish:
name: "Publish to GitHub Packages"
needs: [package]
runs-on: ubuntu-latest
if: github.repository_owner == 'aaronpowell' # && github.token != ''
steps:
- name: Upload
uses: actions/download-artifact@v2
with:
name: package
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
scope: "@aaronpowell"
- run: echo "registry=https://npm.pkg.github.com/@aaronpowell" >> .npmrc
- run: npm publish $(ls *.tgz)
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}