This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
feat(actions): use node 18 #8
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: Config-Man-Workflow | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
working-directory: ./ | |
jobs: | |
# check: | |
# name: 'Check, Lint, Test and Publish' | |
# runs-on: ubuntu-latest | |
# env: | |
# NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# with: | |
# fetch-depth: 1 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 18 | |
# - run: 'yarn --frozen-lockfile --ignore-engines --ignore-optional --non-interactive --silent --ignore-scripts --production=false; yarn peer' | |
# - name: TypeScript Check | |
# run: 'yarn typecheck' | |
# - name: Lint | |
# run: 'yarn lint' | |
# - name: Test | |
# run: 'yarn test' | |
# - name: 'Publish' | |
# # if: github.event_name == 'push' | |
# run: yarn build && cd dist && npm publish | |
lint_and_test: | |
name: 'Check, Lint & Test' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: 'Setup Node' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@pleo-io" | |
cache: "yarn" | |
cache-dependency-path: ${{env.working-directory}}/yarn.lock | |
- run: yarn --frozen-lockfile --ignore-engines --ignore-optional --non-interactive --silent --ignore-scripts --production=false; yarn peer | |
working-directory: ${{env.working-directory}} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }} | |
- name: TypeScript Check | |
working-directory: ${{env.working-directory}} | |
run: yarn typecheck | |
- name: Lint | |
working-directory: ${{env.working-directory}} | |
run: yarn lint | |
- name: Test | |
working-directory: ${{env.working-directory}} | |
run: yarn test | |
publish: | |
name: 'Publish' | |
runs-on: ubuntu-latest | |
# needs: [lint_and_test] | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@pleo-io" | |
cache: "yarn" | |
cache-dependency-path: ${{env.working-directory}}/yarn.lock | |
env: | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: yarn install --frozen-lockfile; yarn peer | |
working-directory: ${{env.working-directory}} | |
- name: Build | |
working-directory: ${{env.working-directory}} | |
run: yarn build | |
- name: Publish | |
run: npm publish --tag beta | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |