Skip to content

πŸ› ignore more packages from root #161

πŸ› ignore more packages from root

πŸ› ignore more packages from root #161

name: 'Publish NPM Package'
on:
push:
branches: ['*']
tags-ignore: ['*']
pull_request:
permissions:
contents: 'read'
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- name: 'Setup node πŸ›ŽοΈ'
uses: 'dudeofawesome/actions/node-setup@a850bdff4354bdb891a86116f0378f8a890e2c16' # v1
- name: 'Build πŸ—οΈ'
run: 'npm run build'
lint:
runs-on: 'ubuntu-latest'
steps:
- name: 'Setup node πŸ›ŽοΈ'
uses: 'dudeofawesome/actions/node-setup@a850bdff4354bdb891a86116f0378f8a890e2c16' # v1
- name: 'Lint πŸ§ͺ'
run: 'npm run lint'
test:
runs-on: 'ubuntu-latest'
steps:
- name: 'Setup node πŸ›ŽοΈ'
uses: 'dudeofawesome/actions/node-setup@a850bdff4354bdb891a86116f0378f8a890e2c16' # v1
- name: 'Test πŸ§ͺ'
run: 'npm run test'
publish:
runs-on: 'ubuntu-latest'
environment: 'production'
permissions:
id-token: 'write'
packages: 'write'
contents: 'write'
needs:
- 'build'
- 'lint'
- 'test'
steps:
- name: 'Setup node πŸ›ŽοΈ'
uses: 'dudeofawesome/actions/node-setup@a850bdff4354bdb891a86116f0378f8a890e2c16' # v1
with:
install-modules: false
- name: 'Publish to NPM πŸš€'
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_AUTH_TOKEN }}'
uses: 'dudeofawesome/actions/npm-publish@a850bdff4354bdb891a86116f0378f8a890e2c16' # v1
- name: 'Get package version πŸ”–'
id: 'get-package-version'
run: 'echo "version=v$(npm pkg get version | jq --raw-output)" >> "$GITHUB_OUTPUT"'
- name: 'Build jsonschema πŸ—οΈ'
run: 'npm run build:jsonschema --workspace packages/code-style'
- name: 'Publish files to Github Releases πŸš€'
uses: 'softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564' # v2
with:
tag_name: '${{ steps.get-package-version.outputs.version }}'
prerelease: "${{ contains(steps.get-package-version.outputs.version, '-') }}"
generate_release_notes: true
files: |
packages/code-style/codestylerc.schema.json